Installing Aspire One's Linpus to USB Drive

Discussion in 'Modding and Customization' started by blackhawk, Sep 4, 2008.

  1. blackhawk

    blackhawk

    Joined:
    Aug 19, 2008
    Messages:
    122
    Likes Received:
    0
    Installing Aspire One's Linpus to USB Drive

    This guide have done using Fedora 8 but will work on another distribution or live CD/DVD/USB. Almost all modern Linux distribution have fdisk and grub. If you have a plan to modify initrd ramdisk, you will need gzip and cpio. You need 4GB+ USB drive, Linpus working fast enough on Imation Atom 4GB :)

    1. Boot to Linux, plug your USB drive and then open a terminal window, login as root. Type 'fdisk -l' (without quote) to see your USB drive device.

    Code:
    # fdisk -l
    ...
    Disk /dev/sdb: 4007 MB, 4007657472 bytes
    255 heads, 63 sectors/track, 487 cylinders
    ...
    
    2. Base on above output, I am sure my USB drive detected as /dev/sdb. Now, we will repartition it as Linux file system.

    Code:
    # fdisk /dev/sdb
    
    Command (m for help): m
    Command action
       a   toggle a bootable flag
       b   edit bsd disklabel
       c   toggle the dos compatibility flag
       d   delete a partition
       l   list known partition types
       m   print this menu
       n   add a new partition
       o   create a new empty DOS partition table
       p   print the partition table
       q   quit without saving changes
       s   create a new empty Sun disklabel
       t   change a partition's system id
       u   change display/entry units
       v   verify the partition table
       w   write table to disk and exit
       x   extra functionality (experts only)
    
    Command (m for help): 
    Press 'm' (without quote) to see fdisk command list and 'p' to see your USB drive current partition table.
    Press 'd' to delete a partition.
    After all partition deleted, make a new partition using 'n' command.
    Select as a primary partition, press 'p'.
    Press '1' when fdisk asking for Partition number, we will only make a single partition on our USB drive.
    When fdisk asking for First cylinder, press Enter. Press Enter again when fdisk asking for Last cylinder. All USB drive capacity allocated as a single partition.
    Set above partition as an active partition, press 'a' and then '1' to select the first partition.
    Press 'w' to write partition table to disk and exit.

    3. Make sure your USB drive not mounted and then format it as ext2 file system, labeling as 'linpus'.

    Code:
    # umount /dev/sdb1
    # /sbin/mkfs.ext2 -L linpus /dev/sdb1
    
    4. Unplug and then back plug your USB drive, Fedora will mount it to '/media/linpus'. It also possible manually mount it to '/mnt/linpus'.

    Code:
    # mkdir /mnt/linpus
    # mount /dev/sdb1 /mnt/linpus
    # cd /mnt/linpus
    
    5. I assume you have Aspire One recovery DVD mounted on '/media/cdrom'.

    Code:
    # cd /mnt/linpus
    # tar xvjf /media/cdrom/hdc._.tar.bz2
    # tar xvjf /media/cdrom/addon/audio.tar.bz2
    # tar xvjf /media/cdrom/addon/desktop.tar.bz2
    # tar xvjf /media/cdrom/addon/euscen.tar.bz2
    # tar xvjf /media/cdrom/addon/pcm_patch0622.tar.bz2
    # tar xvjf /media/cdrom/addon/release103E.tar.bz2
    # tar xvjf /media/cdrom/addon/translate.tar.bz2
    # mkdir dev proc sys
    
    Since first time booting language and password setting wizard not working, no need to extract manual0620.tar.bz2 for now.

    6. Installing grub boot loader to your USB drive but you must replace Linpus grub directory with my grub directory attached here. It also contain a modified initrd ramdisk base on Fedora 8 initrd. I need stabilized command but not exist in Linpus nash binary. I can use sleep command to replace stabilized but HAL daemon refuse to start. I assume your USB drive is the second disk on your computer.

    Code:
    # mv boot/grub boot/grub.old
    # tar xvjf blackhawk-boot.tar.bz2
    # grub
    
        GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
    
    ...
    
    grub> root (hd1,0)
     Filesystem type is ext2fs, partition type 0x83
    
    grub> find /boot/grub/stage1
     (hd1,0)
    
    grub> setup (hd1)
    Checking if "/boot/grub/stage1" exists... yes 
    Checking if "/boot/grub/stage2" exists... yes 
    Checking if "/boot/grub/e2fs_stage1_5" exists... yes 
    Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 16 sectors are embedded. 
    succeeded 
    Running "install /boot/grub/stage1 (hd1) (hd1)1+16 p (hd1,0)/boot/grub/stage2 
    /boot/grub/grub.conf"... succeeded 
    Done. 
    
    grub> quit
    
    Command 'find /boot/grub/stage1' is use to make sure you do not installing grub on wrong disk. If you want to boot Windows XP on SSD from this grub boot loader, add to '/boot/grub/grub.conf':

    Code:
    title Windows XP
        rootnoverify (hd1,0)
        map (hd0) (hd1)
        map (hd1) (hd0)
        chainloader +1
    
    7. Open '/etc/fstab', change Linpus root directory from '/dev/sda1' to 'LABEL=linpus' and comment out swap activation. The last line needed if you want to mount your SSD drive to '/mnt/windows' with read/write permission.

    Code:
    # vi etc/fstab
    
    LABEL=linpus    /     ext2    defaults,noatime    1 1
    ...
    #/dev/sda2    swap    swap    defaults    0 0
    /dev/sda1    /mnt/windows    vfat    user,exec,umask=0    0 0
    
    On vi, press Ins to edit and Esc to quit from edit mode. Type ':qw' + Enter to save and quit from vi.

    8. Open '/etc/rc.d/rc.S' to fix mount point problem and autofsck, change all '/dev/sda1' string to 'LABEL=linpus' (without quote)

    Code:
    # vi etc/rc.d/rc.S
    
    ...
       /sbin/fsck.ext2 -fy LABEL=linpus
    ...
    echo "LABEL=linpus / ext2  rw 0 0">/etc/mtab &
    ...
    
    9. Unmounting your USB drive, installing Aspire One's Linpus finish.

    Code:
    # umount /mnt/linpus
    
    10. Plug your USB drive to Aspire One's USB port, reboot your baby and press F12 to select boot from USB drive. On Linpus, change KPowersave setting to disable autosuspend. Good luck!

    Installing Aspire One's Linpus to SD card
    Almost same as above except you must make a boot disk (grub on USB or SSD) since SD/MMC reader on Aspire One not detected as boot disk by BIOS. You also need a modified initrd to preload Aspire One SD/MMC card driver on boot, you can download it from my rapidshare link http://rapidshare.com/files/145396296/i ... k.img.html . For testing purpose, safer you make a USB boot disk than installing grub to your SSD/HDD master boot record. WinGrub installing to boot.ini also a safe alternatif. Good luck!

    Note: I can not upload my modified initrd and grub directory here, 2.7MB.

    Edit: http://rapidshare.com/files/142481498/b ... r.bz2.html
    09/05/08: Mount point and autofsck fix. Boot Windows XP on SSD from grub on USB.
    09/06/08: add 'mkdir dev proc sys' command at step 5. Without it, Linpus refuse to start. Sorry.
    09/08/08: write partition table to disk
    09/15/08: a single initrd to boot Linpus on USB or SD + short instruction Linpus on SD.
     
    blackhawk, Sep 4, 2008
    #1
  2. blackhawk

    sgtslwilson

    Joined:
    Aug 26, 2008
    Messages:
    61
    Likes Received:
    0
    this is awesom. I would love to be able to use my Linpus recovery cd to put the OS on my sdhc card and then choose to boot either XP from the hard drive or Linpus from the card.

    Are the steps any different? If they are could you write a short "how to" on this?

    sgtslwilson
     
    sgtslwilson, Sep 12, 2008
    #2
  3. blackhawk

    blackhawk

    Joined:
    Aug 19, 2008
    Messages:
    122
    Likes Received:
    0
    Almost same but you need an initrd with memory card driver inside. If you serious ( no much people seem interesting to above guide :( ), I will prepare a set of patch for you.
     
    blackhawk, Sep 12, 2008
    #3
  4. blackhawk

    sgtslwilson

    Joined:
    Aug 26, 2008
    Messages:
    61
    Likes Received:
    0
    Please do. This seems the ideal setup for me. I have a Kodak 4gb SDHC card I can use

    Thanks.
     
    sgtslwilson, Sep 17, 2008
    #4
  5. blackhawk

    XE1UFO

    Joined:
    Sep 8, 2008
    Messages:
    24
    Likes Received:
    0
    I am also very interested! Thanks!
     
    XE1UFO, Sep 26, 2008
    #5
  6. blackhawk

    davexz

    Joined:
    Sep 23, 2008
    Messages:
    15
    Likes Received:
    0
    It is a very useful and instructive post, thanks. I am a new Linux user, so it has been a slow process. Even login as root meant nothing. Eventually found out to use su -. I got stuck at the CDROM stage. I have an USB external CDROM. The reference to /media/cdrom/ did not work for me and I have no idea as to how my CDROM is to be referenced. Please let me know how to figure it out. Thanks!
     
    davexz, Oct 2, 2008
    #6
  7. blackhawk

    blackhawk

    Joined:
    Aug 19, 2008
    Messages:
    122
    Likes Received:
    0
    @davexz
    You can use "mount" command to figure out where your CDROM mounted.
    Code:
    $ mount
    /dev/sda1 on / type ext2 (rw)
    none on /dev/pts type devpts (rw,gid=5,mode=620)
    none on /dev/shm type tmpfs (rw)
    none on /sys type sysfs (rw)
    /dev/mmcblk0p1 on /media/disk type vfat (rw,nosuid,nodev,noatime,uhelper=hal,flush,uid=500,utf8,shortname=lower)
    /dev/sdb1 on /media/disk-1 type vfat (rw,nosuid,nodev,noatime,uhelper=hal,flush,uid=500,utf8,shortname=lower)
    
     
    blackhawk, Oct 7, 2008
    #7
  8. blackhawk

    Bond007ph

    Joined:
    Sep 28, 2008
    Messages:
    2
    Likes Received:
    0
    I have AOA with 8GB SSD. I want windows to run on SSD and Linpus on SD. I have 16GB SD, can I partion them as to 8 for Windows and 8 for Linpus. How will I proceed with Linpus on SD since I dont have external CD drive. Any other way?

    Thanks
     
    Bond007ph, Oct 8, 2008
    #8
  9. blackhawk

    davexz

    Joined:
    Sep 23, 2008
    Messages:
    15
    Likes Received:
    0
    blackhawk, thanks!

    Bond007ph, I am trying to do the exact, same thing, but with an external drive. I thought I'd share with you what I'd attempted and learned so far.

    1) The 16gb sdhc only appears as a removable drive within XP. Lipus treats it as an extension of its 8gb ssd.
    2) XP SP3 is required in order for all the AAO drivers to work properly.
    3) XP SP3 takes up close to 5.5gb, of which pagefile (paging) takes up approximately 780mb, after I reduced the footprint by deleting the $...undelete... files.
    4) Without using blackhawk's method of booting Linpus from USB, attempts to install XP while leaving Linpus intact were met with a warning indicating the need to modify the Linpus partition. I was unable to proceed further.
    5) Although I have not done so, I believe one could create an ISO image of the XP disk and then use a LiveUSB tool to boot via the USB.

    Once installed, a pure XP (single boot) with a 7gb (the 1gb swap partition remained) is a pleasure to use. I had a Sony Vaio x505ZP which had cost me about 4k$ in 2005 that had died. A repair would cost 1k$. So, I bought the AAO instead intending to reinstall my Windows apps. Expecting to find the AAO less adequate than the Vaio, I found instead that the 24gb ssd AAO to be a better system due to the technology advances. It is a bit thicker and heavier than the Vaio, but I'll be more than happy to live with the slight inconvenience.

    I wish that I had taken notes. Good luck.
     
    davexz, Oct 8, 2008
    #9
  10. blackhawk

    davexz

    Joined:
    Sep 23, 2008
    Messages:
    15
    Likes Received:
    0
    blackhawk,

    Pasted below is my attempt to complete the CDROM file copying stage. Still did not work. Apparently, there is a /media/CDROM but someting is still amiss. Please let me know where I went wrong. By the way, for a neophyte Linux user, your detailed explanations are very informative. Thanks. Dave

    [root@localhost linpus]# mount
    /dev/sda1 on / type ext2 (rw)
    none on /dev/pts type devpts (rw,gid=5,mode=620)
    none on /dev/shm type tmpfs (rw)
    none on /sys type sysfs (rw)
    none on /mnt/home type aufs (rw,si=df03dac0,xino=/home/user/.aufs.xino,create=mfs,dirs=/home/user=rw)
    /dev/sr0 on /media/CDROM type iso9660 (ro,nosuid,nodev,uhelper=hal,utf8,uid=500)
    /dev/sdb1 on /media/linpus type ext2 (rw,nosuid,nodev,uhelper=hal)
    /dev/sdb1 on /mnt/linpus type ext2 (rw)
    [root@localhost linpus]# tar xvjf /media/cdrom/hdc._.tar.bz2
    tar: /media/cdrom/hdc._.tar.bz2: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors
    [root@localhost linpus]#
     
    davexz, Oct 8, 2008
    #10
  11. blackhawk

    davexz

    Joined:
    Sep 23, 2008
    Messages:
    15
    Likes Received:
    0
    blackhawk,

    Just a thought, do you think that perhaps the CD for 8gb ssd is structured differently than the one that you have?

    Dave
     
    davexz, Oct 8, 2008
    #11
  12. blackhawk

    davexz

    Joined:
    Sep 23, 2008
    Messages:
    15
    Likes Received:
    0
    blackhawk, never mind my previous note. I read up some more about Linux and figured out how the key commands worked. II played around with the AAO,, but instead of intending to permanently install the system, I decided to let it crash while I learned the commands. I now have a working bootable Linpus. Here is what I did:

    1) As a learning exercise, I used the restore CD to install Linpus onto a 15gb USB. I figured that the process will unzip and create all the files.
    2) Booting from the USB seemed to work fine. However, I needed to determine whether the USB booted and used USB resources or simply booted to the 8gb SSD. So, I removed the SSD partitions and booted with the USB again. This time, the system hang, and so I knew that it was trying to access the removed SSD partitions.
    3) I then skipped to your instructions concerning changing the booting process, GRUB. Learned how to use the vi editor in the process. Upon completion, I had a working Linpus USB!

    Many, many thanks for your gracious sharing of knowledge. Now that I have a Linpus system on the USB, I could use the USB boot to learn Linux.

    Regards,
    Dave
     
    davexz, Oct 8, 2008
    #12
  13. blackhawk

    MX21

    Joined:
    Oct 23, 2008
    Messages:
    2
    Likes Received:
    0
    I just ordered one of the XP versions with HDD. I'd also like to start learning linux, so wanted to
    get the Linpus Lite on a USB that I can plug in and boot from to work with linux. All the instructions
    assume you already have linux to create the linux bootable usb. Is there a way to create the bootable
    linpus on USB key without linux?
     
    MX21, Oct 25, 2008
    #13
  14. blackhawk

    scottro

    Joined:
    Aug 31, 2008
    Messages:
    347
    Likes Received:
    0
    Well, this was interesting. I had had the Linpus edition and made a copy of the CD on another machine's hard drive. However, I think there's something wrong with that machine's burner, as I frequently have had issues with things I've created on it.

    At any rate, followed your instructions, but kept getting grub error 2. Also, I was missing some of the files that you said I should have. So, I am almost sure there was some problem with the ISO image. (I was missing all of the ones that you mention in addon. I had a few other files but not those. It's possible I simply had an older version as the manual also had a different name.)

    So, rather than install grub on the USB, as I've wiped Windows off my 6 cell version and put on a few flavors of Linux, I simply added the USB to grub.conf, with root as /dev/sdb1.

    It booted, but I got a black screen. (Again, I am not at all certain that I'm not dealing with an iso that was corrupt in the first place.)
    So, I rebooted into another Linux system, mounted the USB and changed xinitrc to gdm. I then did a chroot into it and gave user a password (as GDM wouldn't allow user to log in with no password.)

    After that, it worked quite well. I'm debating simply untarring to a partition on the hard drive, though I'm trying to see if I can borrow a recovery CD and try it with something that I'm sure is a good working recovery disk.

    Thank you for the howto.
     
    scottro, Oct 25, 2008
    #14
  15. blackhawk

    scottro

    Joined:
    Aug 31, 2008
    Messages:
    347
    Likes Received:
    0
    Just an update.

    Got a better copy of the recovery DVD and ran your howto again. This time, it worked perfectly, so obviously, the previous problems were due to a bad iso image.

    Once again, many thanks for this howto.
     
    scottro, Oct 26, 2008
    #15
  16. blackhawk

    davexz

    Joined:
    Sep 23, 2008
    Messages:
    15
    Likes Received:
    0
    I looked for a liveCD/USB Linux tool. In my case, found in Wikipedia link to gparted and followed the instructions found there to install gparted on an USB stick. There is a terminal button on the GUI that I used to set up another USB stick with Linpus. The gparted installation includes testdisk. Very useful.
     
    davexz, Oct 28, 2008
    #16
  17. blackhawk

    MX21

    Joined:
    Oct 23, 2008
    Messages:
    2
    Likes Received:
    0

    Thanks, I'll check that out. I'm also in the middle of downloading the Ubuntu Live CD version so I can see if I can run that and then use it to make a bootable USB. Will it work together if I use Ubuntu to format the USB and make it boot, then copy Linpus stuff onto it?

    MX
     
    MX21, Oct 30, 2008
    #17
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.