Jump to content


A rewrite of the steps for Windows users - boot Xandros from USB


44 replies to this topic

#1 albkwan

    ExtrEmE User

  • Members
  • 1,440 posts
  • LocationHong Kong

Posted 12 January 2008 - 01:28 PM

EDIT 2008/9/15: These steps are now obselete unless you want to DIY. I have developed a very easy solution to do this. See this thread: Boot Xandros from USB for Dummies.

EDIT 2008/9/9: I have worked out a new initramfs image which should work for all Eeepc models, i.e. for both unionfs and aufs. The download location and package name is still the same.

EDIT: I have put the latest instructions in this webpage: http://fire.prohosti...nux/bootusb.htm . Also added variation of steps for no unionfs here.

This is a re-write of the steps for Windows users (and Linux newbies) to built Xandros on USB from your desktop with Puppy Linux live CD. This is especially for those who have already installed Windows on the SSD of your eeepc, so you are opt to do it on your desktop with a Puppy Linux live CD.

Booting the stock distro from USB flash disk has been reported to be working good for the simple desktop. But for the advanced desktop on USB flash disk, some people have reported problem. So be conservative on this. There have been some issue reported for booting from SD in built-in card reader: sometimes the SSD filesystem become read only. But if you are just browsing, then it is no problem.

WHAT YOU WILL NEED

1) A desktop PC that supports booting from CD.
2) A DVD ROM on your desktop PC.
3) The Asus P701L.gz image file of the stock distro (from the rescue DVD that comes with your eeepc).
4) A Puppy Linux live CD ISO image which you can download from here: puppy-3.01-seamonkey.iso and burn into a bootable CD. Here is the puppy-3.01-seamonkey.iso.md5.txt for verifying md5 checksum.
5) A target USB device where you want to install your Xandros on USB. It can be any SD, or SD or CF card in a card reader, USB flash disk or USB hard disk partitions of at least 4G size.

We will need to built 2 partitions: the SYSTEM partition (2.5G) and the USER partition (around 1.5G, can be more or less). They can be on separate drives. All we need to do is to identify them with a volume label to be specified in the menu.lst config file of GRUB (the default boot loader). Here I have used the volume labels SYSTEM_USB and USER_USB respectively. Feel free to change to whatever you like, but remember to change them also in your partitions and GRUB menu.lst accordingly.

DOWNLOADS

For those who are not familiar with Linux operations or those who want to live an easy life, I have hosted a package of the 4 necessary files available for download eeepc-bootusb.tgz. [EDIT 2009/8/16: Changed download link to www.mediafire.com.]

You can just copy them to the relevant locations in your Xandros on USB filesystem:
- initramfs-usb-eeepc.img > copy to /mnt/sdx1/boot/
- menu.lst > copy to /mnt/sdx1/boot/grub/
- formatuser.sh > copy to /mnt/sdx1/sbin/
- scanuser.sh > copy to /mnt/sdx1/sbin/
where /mnt/sdx1 is the path where your USB device is mounted by Puppy Linux (check in Pmount, the Puppy Mount Monitor). But do not uncompress the archive in Windows so as to preserve the file attributes. Otherwise, you will need to give exec permissions to the scripts formatuser.sh and scanuser.sh or it will not run.

EXPLANATION OF LINUX TERMINOLOGY

1) Devices
In Linux, each disk and each partition on the disk is treated as a device. For example, the SSD in eeepc is known as /dev/sda (by the stock distro), and the second hard disk (SD0, the built-in card reader) is /dev/sdb. The first partition of the first hard disk is /dev/sda1, and the second partition is /dev/sda2, and so on.

USB flash disk will usually be registered by the kernel of the stock distro as /dev/sdc. If you have more than one USB storage device plugged in, then it may varies. Also for some multi-card reader, I have experience coming up to /dev/sdg with the eeepc.

SATA, SCSI and USB disks are all known as /dev/sdx. For IDE hard disks, they are known as /dev/hda, hdb, hdc and so on. The complication here is that Puppy Linux sees the devices differently. It sees the SSD of eeepc as /dev/hdc, and SD0 (the built-in card reader) as /dev/sda. So do not mix up, verify by looking at their volume label, sizes and file types in Pmount: The SSD is "SILICONMOTION SM223AC" and the built-in card reader is "USB2.0 CardReader SD0".

2) Running Linux commands
Although Puppy Linux has lots of GUI tools, but some advanced operations still need to be done on the command line. See this wiki: guide to terminal for more information.

3) The mknod command
The mknod command creates device special files. Some arguments need to be specified running this command. The arguments we need here are:
-m set permission modes. We are using 644 (rw-r--r--) for SYSTEM partition because it is mounted read only and 660 (rw-rw----) for USER partitions read/write
b - specify as a block device (hard disk).
major - major device number = 8 for SCSI disk driver
minor - minor device number (0 = /dev/sda, 16 = /dev/sdb, 32 = /dev/sdc ...)
You can refer to the manual page of this command for more details here.

PUPPY LINUX SPECIFIC INSTRUCTIONS

1) Mount/umount a drive
On the desktop of Puppy Linux, there is a "drives" icon. Click on that will launch Pmount, the Puppy Mount Monitor
Posted Image
On startup of Pmount or when you click [Refresh], Pmount will scan your computer and list all drives. Click on the rightmost icon that looks like a disk will mount that partition. The icon will then turn green and show the mounting point and partition size on the left together with a "folder" icon.
[NB. If your desktop is too small, and not all the drives are seen. You can press [Alt] + Mouse left click on the Pmount window to drag it up.]

2) File Manager
Open the default file manager of Puppy Linux (Rox-filer) by clicking on the "folder" icon in pmount for that drive.

3) Terminal
Open a terminal from file manager by [Right click] > Window > Terminal Here
Posted Image
4) Edit Text file
Edit a text file by [Right click] on the file > File 'xxxxx' > Open As Text
Posted Image

5) Drag and Copy files
Copy files between 2 windows of Rox-filer by drag and drop
Posted Image
6) Create New Directory
Create a new directory by [Right Click] on empty space > New > Directory
Posted Image

STEPS
[NB. In the steps here, I have used /dev/sdx for the target device where you want to install your Xandros on USB. Check the correct device name in Pmount and substitute them in the commands accordingly.]

1) Copy the Asus P701L.gz image file of the stock distro from the rescue DVD and put it somewhere on the hard disk of your desktop PC.

2) Put the Puppy Linux live CD into your CDROM and boot your desktop with it. You may need to enter BIOS to change the boot sequence. During the boot process, you will have to answer a few questions:
(i) Options - just [Enter]
(ii) Keyboard - choose your national keyboard
(iii) Display Driver (Xorg or Xvesa) - Any will do
(iv) Display resolution - 1024x768 should do for most modern desktop PC

3) Click on the "drives" icon on the desktop of Puppy Linux to launch Pmount. Mount the device where you have copied the P701L.gz image file.

4) In Pmount, open file manager by clicking on the "folder" icon for the device where you have copied the P701L.gz file. Navigate into the folder with the image file.

5) Open a terminal and run this command to extract the P701L.gz image to the target device. Replace sdx with the correct device name as you can see in Pmount. [Caution: Umount the target device first]
gunzip -c P701L.gz | dd of=/dev/sdx
This will copy the MBR and the SYSTEM partition to the target drive (/dev/sdx).

6) Change the volume label of the SYSTEM partition, SYSTEM_USB for me or any for your choice. Open a terminal and run this command:
e2label /dev/sdx1 SYSTEM_USB
7) Start cfdisk and create the USER partition on remaining space of USB device

Menu > System > Pdisk Partition Manager > sdx > cfdisk
Posted Image
New > Primary > Enter > Write > "yes" > Quit
Posted Image
[NB. Pressing [Enter] after selecting [Primary] will use all the remaining space for your USER partition. If you have a 8G SD, you may want to specify the size and reserve some space for another fat32 data partition.]

8) Open a terminal and format the new partition to ext3 filesystem with this command:
mke2fs -c -L USER_USB /dev/sdx2
tune2fs -j /dev/sdx2
Change USER_USB in this command if you choose a different volume label.

You may also do it with GParted Partition Manager :
Menu > System > GParted Partition Manager
Posted Image
It has a graphical interface and is quite straightforward. But lots of steps compared with the command line!

9) [Refresh] in Pmount and mount /dev/sdx1 (click the rightmost "drive icon"). Then open file manager for that drive (click the leftmost "folder icon"). Navigate into the folder /mnt/sdx1/boot.

10) Mount the device where you have downloaded the 4 files. Open file manager for that drive and navigate to the folder where you have put them. Drag and drop the file "initramfs-usb-eeepc.img" to the other window of /mnt/sdx1/boot.

11) Navigate into the folder /mnt/sdx1/sbin. Then drag and drop the files "scanuser.sh" and "formatuser.sh" you have downloaded here.

12) Navigate into the folder /mnt/sdx1/boot/grub, drag and drop the file "menu.lst" you have downloaded here.

13) Run a filesystem check on your partitions before you reboot. For me, the easy way is to do it on the command line. Open a terminal and run these commands:
umount /dev/sdx1
e2fsck -c /dev/sdx1
umount /dev/sdx2
e2fsck -c /dev/sdx2
Or you can do it with GParted partition manager:
- Menu > System > GParted partition manager
- Select /dev/sdx on the top right (Maximize the window if you can't see it)
- Highlight the line /dev/sdx1
- Partition > Check
Posted Image
- Highlight the line /dev/sdx2
- Partition > Check
- Edit > Apply all operations
[NB. Umount the partitions with Pmount before running filesystem check.]

14) Now your Xandros on USB is ready for use. Plug it into your eeepc, press [Esc] at startup and select USB: USB2.0 Card Reader SD0 or USB Storage Device as first boot device.

FOR THE ADVENTUROUS
For the adventurous, you may want to build the init RAM filesystem image from scratch. Here are the modified steps:

9) Create a new directory "temp" in /mnt/sdx1/boot. This is where you will extract the original initramfs iimage.

10) Navigate into the new folder /mnt/sdx1/boot/temp, open a terminal and extract the initramfs image with this command:
gunzip < ../initramfs-eeepc.img | cpio -i
11) Edit the file "init". Replace its content with that on this thread.

13) Navigate into the folder /mnt/sdx1/boot/temp/modules. Open another file manager window of the same drive and navigate into the folder /mnt/sdx1/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb. Look for the files usbcore.ko, ehci-hcd.ko, uhci-hcd.ko, libusual.ko and usb-storage.ko in the different sub-folders. These are the kernel modules you will need to boot from USB device. Drag and copy them here.

14) Navigate into the folder /mnt/sdx1/boot/temp/dev. Open a terminal and create the necessary devices for mounting the root filesystem during startup with the mknod command:
mknod -m 644 sdb1 b 8 17
mknod -m 660 sdb2 b 8 18
mknod -m 660 sdb3 b 8 19
mknod -m 644 sdc1 b 8 33
mknod -m 660 sdc2 b 8 34
mknod -m 660 sdc3 b 8 35
mknod -m 644 sdd1 b 8 49
mknod -m 660 sdd2 b 8 50
mknod -m 660 sdd3 b 8 51
mknod -m 644 sde1 b 8 65
mknod -m 660 sde2 b 8 66
mknod -m 660 sde3 b 8 67
mknod -m 644 sdf1 b 8 81
mknod -m 660 sdf2 b 8 82
mknod -m 660 sdf3 b 8 83
mknod -m 644 sdg1 b 8 97
mknod -m 660 sdg2 b 8 98
mknod -m 660 sdg3 b 8 99
mknod -m 644 sdh1 b 8 113
mknod -m 660 sdh2 b 8 114
mknod -m 660 sdh3 b 8 115
15) Now you can pack the initramfs image. Navigate into the folder /mnt/sdx1/boot/temp, open a terminal and run this command:
 find | cpio -H newc -o | gzip -9 > ../initramfs-usb-eeepc.img
16) Navigate into the folder /mnt/sdx1/boot/grub. Edit the file menu.lst, and replace its content as per this thread. If you choose to use your own volume labels for the SYSTEM and USER partitions, change them in these lines:

kernel /boot/vmlinuz-2.6.21.4-eeepc ... root=label:SYSTEM_USB USERLABEL:USER_USB ...

17) Navigate into the folder /mnt/sdx1/sbin. Edit the files "scanuser.sh" and "formatuser.sh". Replace their content as per this thread.

18) Continue as per step 13 above to run a filesystem check before you reboot.

Edited by albkwan, 16 August 2009 - 03:03 PM.

EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

#2 jasonp

    Advanced Member

  • Members
  • PipPipPip
  • 57 posts

Posted 12 January 2008 - 02:41 PM

Very clear and detailed steps , an excellent guide and with sufficient details and references for the more adventurous. I salute you - albkwan!

Now even a noob can do this with confidence.

#3 rivethead

    Member

  • Members
  • 13 posts

Posted 12 January 2008 - 04:04 PM

Thanks so much albkwan I've tried this a number of times but somewhere or another I've hosed it up and ended up reformatting the usb and starting over. Trying to edit and do everything on the EEE's little keyboard isn't so fun either heh.

Unfortunately it appears the image hosting service is down or something I'm getting none of the pictures :(

Woot this worked like a champ!

Edited by rivethead, 13 January 2008 - 02:20 AM.


#4 albkwan

    ExtrEmE User

  • Members
  • 1,440 posts
  • LocationHong Kong

Posted 12 January 2008 - 04:43 PM

Somehow this image showing thing is very mischievous. When I wrote this thread, all the images are showing alright. Now I have to add a url to them.

Yet clicking on the image url will sometimes open to an "unable to access" window. If you click on the address bar and refresh again. Then it will show up. And once it has shown up once, then it will also show up on the thread. Kind of strange!

For the download files, I have double-checked. They are still there available for download.

Edited by albkwan, 12 January 2008 - 04:44 PM.

EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

#5 albkwan

    ExtrEmE User

  • Members
  • 1,440 posts
  • LocationHong Kong

Posted 13 January 2008 - 04:11 AM

I have changed the server location for the download files and the images. Somehow the other servers have been not very reliable.

Also a few changes in the steps to add more description.
EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

#6 gsgreg

    Member

  • Members
  • 14 posts

Posted 16 January 2008 - 08:03 AM

albkwan, just wanted to say a big thank you from a windows user for this easy to use step by step guide. Thanks to you I have done this a couple of times now and it works perfect each time (just waiting for new sd card as I keep frying the usb key in advanced mode on shut down)
For all of us Linux newbies this really deserves to be added to the Wiki so it doesn't get lost in all the pages in this section of the forum.
Thanks again
Greg

#7 jasonp

    Advanced Member

  • Members
  • PipPipPip
  • 57 posts

Posted 17 January 2008 - 01:52 AM

I've updated the wiki to point to this thread for Windows users.

#8 polparis

    New member

  • Members
  • 2 posts

Posted 22 February 2008 - 07:13 PM

Hi I found an easyest way to install xandros on any usb device (actually i'm just translating a post from a french forum)
You need:-Another PC than the EEE (a desktop is better)
-The asus restoration DVD
-a 4gigs usb device (I'm not sure 2 gigs will be enough)
1)Unplug all hard drives from the PC (otherwise the asus dvd will erase all partitions on them)
2)Plug your USB device in
3)Boot from asus DVD and run the restoration
4)That's it you've got xandros on your usb thumb/sd card/external hard drive..
5)Just in case somebody forgot^^ Plug your usb device in the EEE after the BIOS screen press escape and boot from usb or sd

#9 jlekssp

    Advanced Member

  • Members
  • PipPipPip
  • 77 posts

Posted 23 February 2008 - 01:12 AM

Quote

Hi I found an easyest way to install xandros on any usb device (actually i'm just translating a post from a french forum)
You need:-Another PC than the EEE (a desktop is better)
-The asus restoration DVD
-a 4gigs usb device (I'm not sure 2 gigs will be enough)
1)Unplug all hard drives from the PC (otherwise the asus dvd will erase all partitions on them)
2)Plug your USB device in
3)Boot from asus DVD and run the restoration
4)That's it you've got xandros on your usb thumb/sd card/external hard drive..
5)Just in case somebody forgot^^ Plug your usb device in the EEE after the BIOS screen press escape and boot from usb or sd
wouldn't mind i ask? hv u tested this? both for easy mode & adv mode?

#10 albkwan

    ExtrEmE User

  • Members
  • 1,440 posts
  • LocationHong Kong

Posted 23 February 2008 - 09:32 AM

Quote

Hi I found an easyest way to install xandros on any usb device (actually i'm just translating a post from a french forum)
You need:-Another PC than the EEE (a desktop is better)
-The asus restoration DVD
-a 4gigs usb device (I'm not sure 2 gigs will be enough)
1)Unplug all hard drives from the PC (otherwise the asus dvd will erase all partitions on them)
2)Plug your USB device in
3)Boot from asus DVD and run the restoration
4)That's it you've got xandros on your usb thumb/sd card/external hard drive..
5)Just in case somebody forgot^^ Plug your usb device in the EEE after the BIOS screen press escape and boot from usb or sd
Like this, you can skip steps 1 - 5 above and continue with step 6, rebuild the initramfs image to make it bootable from USB.
EeePC 4G white,
Default Xandros (Easy Mode + icewm start menu) on 1st SSD/2nd 16GB SSD added/SD/USB/
http://eeepc.fire.prohosting.com/
http://eeepc-albkwan.blogspot.com/

#11 polparis

    New member

  • Members
  • 2 posts

Posted 23 February 2008 - 04:55 PM

I tested it but i tried to do it only with the eee so i used the asus dvd to make a bootable usb stick with xandros installation files on it and i disabled in the ee bios my SSD and plugged on the eee my bootable xandros USB stick ans another (the xandros installation target) and it didn't worked^^ It just deleted my windows installation and install xandros on the ssd so i'll now try the "normal" method with anothr pc^^
I"ll tell whether it works or not but on the frech forum several people sucedeed

#12 jshuff

    New member

  • Members
  • 4 posts

Posted 07 March 2008 - 10:06 PM

I have followed all the instructions but I'm unable to write files into the grub directory. I keep getting
reading directory .: Input/output error

I can't even rm the directory or anything.

Any suggestions on how I could get the menu.lst file into the grub folder?

Edited by jshuff, 07 March 2008 - 10:06 PM.


#13 bl4der

    New member

  • Members
  • 1 posts

Posted 28 March 2008 - 01:54 PM

@jshuff
got the same Prob. I think it's caused by grub-update or "setup/install" in grub. i cant create menu.lst file but menu.lst-bak. it seemes that grub has still access to this file. As soon as I find some solution i'll post it here...

#14 azmui

    Member

  • Members
  • 14 posts

Posted 31 March 2008 - 06:10 AM

Alright, I'm an idiot or I'm a bigger noob than I thought ... For the life of me, I am missing something that I can not seem to figure in getting this completed ... I have a 4GB USB and I have th P701L.gz file copied over on my desktop along with the 4 additional files. I run the Puppy Linux CD boot I created as required above, and then I use the PMount thingy and I locate the P701L.gz file and run the terminal window to type the command and it does nothing after I type it? It should not take that long at all since its just unzipping the files to my target USB right? Also, where and when am I suppose to partition the USB drive? Is it along the way of the easy steps or if I need to complete this before the "Easy Steps", how and when? Any help will be greatly appreciated. Thanks.

#15 SteveLawUK

    ExtrEmE User

  • Members
  • 3,637 posts
  • LocationUK

Posted 31 March 2008 - 06:43 AM

Quote

Alright, I'm an idiot or I'm a bigger noob than I thought ... For the life of me, I am missing something that I can not seem to figure in getting this completed ... I have a 4GB USB and I have th P701L.gz file copied over on my desktop along with the 4 additional files. I run the Puppy Linux CD boot I created as required above, and then I use the PMount thingy and I locate the P701L.gz file and run the terminal window to type the command and it does nothing after I type it? It should not take that long at all since its just unzipping the files to my target USB right?
It is not just unzipping the gz file it is unzipping it and then writing the data to the drive/SD It can take 5-15 minutes (maybe even longer). Be patient - its the only thing I don't like about dd - no progress indicator.
2G Surf - "A cracking little machine."

If it ain't broke, don't fix it.

#16 azmui

    Member

  • Members
  • 14 posts

Posted 31 March 2008 - 08:57 AM

Quote

Quote

Alright, I'm an idiot or I'm a bigger noob than I thought ... For the life of me, I am missing something that I can not seem to figure in getting this completed ... I have a 4GB USB and I have th P701L.gz file copied over on my desktop along with the 4 additional files. I run the Puppy Linux CD boot I created as required above, and then I use the PMount thingy and I locate the P701L.gz file and run the terminal window to type the command and it does nothing after I type it? It should not take that long at all since its just unzipping the files to my target USB right?
It is not just unzipping the gz file it is unzipping it and then writing the data to the drive/SD It can take 5-15 minutes (maybe even longer). Be patient - its the only thing I don't like about dd - no progress indicator.
Thx Steve for the tip ... I was able to copy the files and create the 2 partitions but I have having difficulty now copying the last 4 files to the System Partition. On the PMount screen, it wont let me open up either partitions so I can browse for the folder directory to drop the 4 files to correspendingly. I verified in GParted that I have one SYSTEM_USB 2.30GB total 2.08 used and one USER_USB 1.43GB totals and 25.22MB used.

Is there a command I can use to complete the last steps of copying the last 4 files over?

Thx again.

#17 azmui

    Member

  • Members
  • 14 posts

Posted 02 April 2008 - 04:53 AM

Ok ... I can get everything done up to the point of copying the menu.lst file but it gives me an error ... any help please? thx

.... looking back at the other posts, I am also getting the input/output error copying the menu.lst file into the grub directory ... any solutions yet?

Edited by azmui, 02 April 2008 - 05:52 AM.


#18 maskatuoklis

    New member

  • Members
  • 5 posts

Posted 13 April 2008 - 11:00 PM

I have a strange situation: after step 5 my 4GB CF card (sandisk extreme if it matters) becomes invisible to windows and linux. Any ideas why ? ;/

#19 brucine

    ExtrEmE User

  • Members
  • 2,479 posts

Posted 03 May 2008 - 09:44 AM

very fine tutorial, indeed, but maybe still too "technical" for the linux noobs.

i suppose maskatuoklis did the first mistake i did the first time:
as sollicited to "enter the name as seen in pmount", i typed "sdb1", when i should have typed "sdb", this point seeming obvious to linux users....but not to noobs.

actually, true that i can't get the advanced desktop to work on the usb stick, rendering for the time being the job quite useless.

the nextstep would be, if someone knows how to achieve that, to get windows on the ssd "live double boot" (something like xosl, maybe?)

xandros runs well on the usb stick, but is a little slower (most notably for boot time).

last, but not least, the puppy live cd used merely as a tool is very impressive (outside of the usual very childish linux interface): it is very light, very graphical (good news for the noobs), and it answers a stupid question; i thought one could not do anything since he could not write on the cd, but when you exit, you are asked where you want to save your personal modifications.

#20 logan5

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 08 May 2008 - 03:25 PM

I have the Windows 900 version and I would like to be able to install Xandros. Is the above guide compatible with the new machine?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users