# Problem with booting "LiveUSB"

## Maf

Hi everyone. I created USB image of minimal Gentoo LiveCD 2007-r1 using this how-to:

http://www.gentoo.org/doc/en/liveusb.xml

Unfortunately, during boot I got something like this:

```

Attempting to mount media :/dev/sr0

Attempting to mount media :/dev/sda

Attempting to mount media :/dev/sda1

Attempting to mount media :/dev/sda2

Attempting to mount media :/dev/sda5

Attempting to mount media :/dev/sdb1

No Bootable media found. Waiting for new device.

Attempting to mount media :/dev/sr0

Attempting to mount media :/dev/sda

Attempting to mount media :/dev/sda1

Attempting to mount media :/dev/sda2

Attempting to mount media :/dev/sda5

Attempting to mount media :/dev/sdb1

Couldn't find CD to boot, something else is needed

Determining root device...

root block device is unspecified or not detected.

Please specify a device to boot or "Shell" for a shell :> 

```

My cdrom is /dev/sr0 and my usb flash drive is /dev/sdb1. Basicly, Gentoo is looking for CD and it should have found it on my usb flash drive. Anyone has got an idea?

----------

## Ehnvis

I have never succeded in using any other cd than 2006.0 on an USB stick. Try that one and see if it works better or not. 

If you dont want to try the older minimal cd on the USB stick you have to do some major changes on the setup as it doesnt seem to find the USB for some reason at that point. Maybe some extra delay or something would do it.

----------

## Maf

 *Ehnvis wrote:*   

> I have never succeded in using any other cd than 2006.0 on an USB stick.

 

With 2006.0 minimal x86 same thing happens :/

----------

## niceness

Well, it looks like the script couldn't mount /dev/sdb1 (what fs is on ther partition? fat32?)... or it mounted it but couldn't find a file named livecd on it.

Boot the 2007.0 again, but  this time enter 'shell' at the prompt. Try to mount your partition (mount /dev/sdb1 /mnt/cdrom) and take a look at the dmesg output.

----------

## Maf

 *niceness wrote:*   

> what fs is on ther partition? fat32?

 

If you mean another partition on my usb flash drive, then there is none, only /dev/sdb1 livecd partition. I'll try to do stuff suggested by you tomorrow morning:)

----------

## niceness

It's a typo. I wanted to ask what filesystem is on sdb1... it probably doesn't matter anyway.

I only asked because there were some problems mounting fat32 with the 2006 livecd, but I don't think that is the case with 2007.0.

... my english sucks, I know  :Smile: 

----------

## Maf

 *niceness wrote:*   

> It's a typo. I wanted to ask what filesystem is on sdb1...

 

As written in how-to, it's FAT 16

OK, I put 2007.0-r1 again on my flash drive. Same error, I typed shell then and had to 'mkdir -p /mnt/cdrom'. But I could't mount it by typing 'mount /dev/sdb1 /mnt/cdrom'. Sdb1 was listed in /dev. Weird  :Neutral: 

----------

## niceness

As I said before, after you try to mount /dev/sdb1 run dmesg and take a look at the last couple of lines. The kernel will usually spit out some useful info.

----------

## Maf

Ok I run dmesg'ed after trial of mounting and here's what I got:

```
[...]

Unable to load NLS charset cp437

FAT: codepage cp437 not found

UDF-fs: No VRS found

```

So I booted 2006.0 livecd (the one on my USB pendrive is 2007.0-r1) and checked kernel config:

```
# zcat /proc/config.gz | grep 437

CONFIG_FAT_DEFAULT_CODEPAGE=437

CONFIG_SMB_NLS_REMOTE="cp437"

CONFIG_NLS_CODEPAGE_437=y

```

I also was able to mount my pendrive under booted 2006 livecd. Does this all mean it should work?  :Confused: 

----------

## jasiu85

Hey,

I got the same problem. I know that the HOWTO required 1GB drive and the LiveCD image, but I only have 512MB drive, so I copied the MinimalCD image on it. I suppose that the problem is that the kernel in the minimal version does not support codepage 437.

Sooo...

Is there any easy fix to that? I know that I could just use 1GB stick, but I don't have one... So maybe copy kernel from the LiveCD into MinimalCD? Or Copy the big LiveCD image to the stick and truncate the last 200 megs and pray for it to work?  :Smile: 

Mike

----------

## niceness

 *Maf wrote:*   

> Ok I run dmesg'ed after trial of mounting and here's what I got:
> 
> ```
> [...]
> 
> ...

 

Thats the same problem I was having with minimal livecd 2006.

My solution: use ext2 instead of fat   :Very Happy: 

----------

## jasiu85

 *niceness wrote:*   

> My solution: use ext2 instead of fat  

 

How come? When I do all the steps described in the HOWTO and then run syslinux, it complains that it couldn't find a valid FAT filesystem...

Anyway, I tried to do the following: I mounted the LiveCD image (where the kernel is good) and replaced the image.squashfs file with the one coming from the MinimalCD (because its small). Then I copied everything into USB stick, ran syslinux etc. So basically I created a hybrid  :Smile: . And it almost works... The kernel still can't mount the /newroot, but when I enter shell, I can mount my stick and the squashfs on it. However, I can't make the boot process resume. Any ideas?

----------

## niceness

 *jasiu85 wrote:*   

>  *niceness wrote:*   My solution: use ext2 instead of fat   
> 
> How come? When I do all the steps described in the HOWTO and then run syslinux, it complains that it couldn't find a valid FAT filesystem...

 

You need extlinux (syslinux for ext2/ext3). Grub (or lilo) is also an option.

----------

## Roman_Gruber

Hi

May if it works you update the wiki, Thank you.

----------

## Maf

Ok so I used ext2 and instead of syslinux I run extlinux on mounted usb's file system (as it wished):

```

extlinux -i /dev/sdb1

```

This time, first of all I have to write 'gentoo' at prompt, then after drives detection kernel panic occurs. Is says it couldn't find root and ask for 'root=' append. I run then with 'root=/dev/sdb1' append but it still halts. Damn it..

----------

## jasiu85

 *Maf wrote:*   

> Ok so I used ext2 and instead of syslinux I run extlinux on mounted usb's file system (as it wished):
> 
> ```
> 
> extlinux -i /dev/sdb1
> ...

 

Hey, can you tell exactly how did you prepare the USB stick? I still can't make it work :/.

Also, I tried to install GRUB on the stick, but still no success. Anybody knows what does it mean when GRUB only displays "GRUB ", nothing else and then hangs?

Mike

----------

## Maf

 *jasiu85 wrote:*   

> Hey, can you tell exactly how did you prepare the USB stick? I still can't make it work :/.
> 
> Also, I tried to install GRUB on the stick, but still no success. Anybody knows what does it mean when GRUB only displays "GRUB ", nothing else and then hangs?
> 
> Mike

 

As mentioned above, http://www.gentoo.org/doc/en/liveusb.xml

They use FAT 16 there

----------

## tcostigl

I can not boot from my LiveUSB either but my problem is different. I get this same message

 *Quote:*   

> Code:
> 
> ```
> 
>   Attempting to mount media :/dev/sr0 
> ...

 

However when enter the shell I can mount /dev/sda1 and even mount the image.squashfs after that. But when I specify to boot /dev/sda1 i get this message:

```

Booting (initramfs).umount: couldnt umount /sys: Invalid argument

```

followed by "attempted to kill init" and a kernel panic.

I used catalyst to build the iso, but it boots fine from a cd. Is there something I have to change to tell the kernel how to load the image.squashfs ?

----------

## JackFrost

You have to change somthinge in gentoo.igz

Look at http://hup.hu/node/30374

I have changed cdroot too cdroot=/dev/sdb1 and followed Point 8a to 8e 

The MinimalUSB works  :Smile: 

Greetings JackFrost

----------

## 93nt00r0ck5

I've been having the same problems as described.  My solution was to use ext2 on the usb flash drive.  A couple of gotchas though.  Make sure your usb drive is mounted before you issue the "extlinux -i /dev/sda1" command (be sure to substitute sda1 with the correct device for your usb drive).  And then you have to mv, ln or cp your syslinux.cfg file to extlinux.conf.  (eg. cp /mnt/usb/syslinux.cfg /mnt/usb/extlinux.conf).  Once I did those 2 things I was able to boot the 2007.0 minimal CD from my usb flash drive.

L8r, Andrew

----------

## Maf

 *93nt00r0ck5 wrote:*   

> I've been having the same problems as described.  My solution was to use ext2 on the usb flash drive.  A couple of gotchas though.  Make sure your usb drive is mounted before you issue the "extlinux -i /dev/sda1" command (be sure to substitute sda1 with the correct device for your usb drive).  And then you have to mv, ln or cp your syslinux.cfg file to extlinux.conf.  (eg. cp /mnt/usb/syslinux.cfg /mnt/usb/extlinux.conf).  Once I did those 2 things I was able to boot the 2007.0 minimal CD from my usb flash drive.
> 
> L8r, Andrew

 

Yea, like a week ago I did something like this with ext3 but didn't work.. but I'll try with ext2 as soon as possible

----------

## 93nt00r0ck5

For the record, I was following http://www.gentoo.org/doc/en/liveusb.xml.  I basically followed that step by step, except I used the 2007.0 minimal boot cd and of course, I substituted creating a fat16 partition for ext2 and used extlinux instead of syslinux.  Here is a condensed step-by-step (using /dev/sda as our usb drive):

1) fdisk /dev/sda, delete all partitions, create new primary partition (id 83 Linux).  Mark it active using fdisk's 'a' command.  'w' to write new partition table and exit fdisk.

2) create ext2 file system: mke2fs /dev/sda1

3) Copy mbr to usb disk: dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

4) Copy over the files from the CD/ISO to the usb drive per the instructions from the above mentioned link.

5) Do the sed command per Code Listing 3.5 in the instructions

6a) Don't unmount /dev/sda just yet, but instead do: extlinux -i /mnt/usb (change /mnt/usb to where ever you mounted the usb drive).

6b) mv /mnt/usb/syslinux.cfg /mnt/usb/extlinux.conf

7) umount /dev/sda1, reboot, enjoy  :Wink: 

Hope this helps.

Good Luck, Andrew

Now if only I can get gnap (http://www.gentoo.org/proj/en/base/embedded/gnap-userguide.xml) to boot from my usb stick  :Very Happy: 

edit: oops, had a typo on step 2 and forgot the ' mv /mnt/usb/syslinux.cfg /mnt/usb/extlinux.conf ' command; added it a step 6b.Last edited by 93nt00r0ck5 on Wed Nov 07, 2007 5:25 pm; edited 1 time in total

----------

## Maf

 *Maf wrote:*   

> Ok so I used ext2 and instead of syslinux I run extlinux on mounted usb's file system (as it wished):
> 
> ```
> 
> extlinux -i /dev/sdb1
> ...

 

Lol I unconsciously did the same thing as in quoted text, and it still doesn't work, kernel panics!  :Smile: 

Can you help me how to figure out correct root for me?

----------

## Tolstoi

 *JackFrost wrote:*   

> You have to change somthinge in gentoo.igz
> 
> Look at http://hup.hu/node/30374
> 
> I have changed cdroot too cdroot=/dev/sdb1 and followed Point 8a to 8e 
> ...

 

Where die you find that line "cdroot=/dev/sdb1", Mr Frost   :Very Happy:  ? Maybe I'm too tired but I can' see it. Found the other stuff though.

----------

## theDuck

Many thank's Andrew. I followed your instructions and now have a Gentoo 2007.0-r1 Minimal x86 LiveUSB.  :Very Happy: 

I have writen up my notes in the hope that others might find them useful. So here is my howto:

download iso image (I used "install-x86-minimal-2007.0-r1.iso"). Then:

```
fdisk /dev/sda                                                             # partition the usbdrive

      d                                                                    # delete partitions

      np1[start][finish]                                                   # create new primary partition

      a1                                                                   # make partition bootable

      w                                                                    # write table

mke2fs /dev/sda1                                                           # make ext2 filesystem

tune2fs -c 0 /dev/sda1                                                     # prevent filesystem checks

tune2fs -i 0 /dev/sda1                                                     # prevent filesystem checks

dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda                                # install masterboot record

mkdir -p /mnt/cdrom                                                        # create cdrom mount point

mount -o loop,ro -t iso9660 install-x86-minimal-2007.0-r1.iso /mnt/cdrom   # mount iso image

mkdir -p /mnt/usb                                                          # create usbdrive mount point

mount /dev/sda1 /mnt/usb                                                   # mount usbdrive

cp -r /mnt/cdrom/* /mnt/usb                                                # copy iso image to usbdrive

mv /mnt/usb/isolinux/isolinux.cfg /mnt/usb/isolinux/extlinux.conf          # rename isolinux.cfg to extlinux.conf

umount /mnt/cdrom                                                          # unmount iso image

nano /mnt/usb/isolinux/extlinux.conf                                       # add slowusb after cdroot (if necessary)

extlinux -i /mnt/usb/isolinux                                              # install bootloader

umount /dev/sda1                                                           # unmount usbdrive

```

Then try it out!  :Razz: Last edited by theDuck on Fri Feb 08, 2008 8:09 am; edited 1 time in total

----------

## leo.fontenelle

 *Quote:*   

> # add slowusb after cdroot

 

Couldn't this be the answer to the "No Bootable media found. Waiting for new device." issue?

----------

## the_isz

 *theDuck wrote:*   

> Many thank's Andrew. I followed your instructions and now have a Gentoo 2007.0-r1 Minimal x86 LiveUSB. :D
> 
> I have writen up my notes in the hope that others might find them useful. So here is my howto:
> 
> [...]
> ...

 

Thanks for the roundup, theDuck! This helped me get a bootable pen drive from the Gentoo 2008.0_beta2 Minimal CD. I merely didn't have much success using syslinux (e.g. the config file you mention was missing), so I switched to grub, which I also find more helpful as the 2008 minimal CD already has a usable menu.lst for it.

My steps were almost the same as yours, I'll just repeat them for better readability (if someone also wants to use grub):

Remember to substitute sda with your pen drive's device file and hd1 with your drive in grub. The latter one can often be determined by trial and error. Like on my system, there is no other ext2 filesystem, so I knew I found my pen drive when grub reported such a fs. The first one should be easily found by checking dmesg's output after you insert the pen drive into an usb slot of your system.

Download iso image (I used "install-x86-minimal-2008.0_beta2.iso"). Then:

```

fdisk /dev/sda                                                                # partition the usbdrive

      d                                                                       # delete partitions

      np1[start][finish]                                                      # create new primary partition

      a1                                                                      # make partition bootable

      w                                                                       # write table

mke2fs /dev/sda1                                                              # make ext2 filesystem

tune2fs -c 0 /dev/sda1                                                        # prevent filesystem checks

tune2fs -i 0 /dev/sda1                                                        # prevent filesystem checks

mkdir -p /mnt/cdrom                                                           # create cdrom mount point

mount -o loop,ro -t iso9660 install-x86-minimal-2008.0_beta2.iso /mnt/cdrom   # mount iso image

mkdir -p /mnt/usb                                                             # create usbdrive mount point

mount /dev/sda1 /mnt/usb                                                      # mount usbdrive

cp -r /mnt/cdrom/* /mnt/usb                                                   # copy iso image to usbdrive

umount /mnt/cdrom                                                             # unmount iso image

cd /boot/grub                                                                 # change into grub directory of your desktop's system

cp stage1 stage2 e2fs_stage1_5 /mnt/usb/boot/grub                             # cp the necessary stage files to the stick

umount /mnt/usb                                                               # unmount usbdrive

grub                                                                          # Start grub

      root (hd1,0)                                                            # Make your pen drive the root (lookout for ext2 fs)

      setup (hd1)                                                             # Install grub into pen's mbr

      quit                                                                    # Quit grub

```

Reboot, and have fun :)

Edit: corrected order of commands and added note

----------

## mani001

the_isz,

I followed your instructions and the computer boots...but only until the grub prompt. Am I missing something?

(I tried with the "install-amd64-minimal-2008.0-r1.iso" and, just in case it matters, it doesn't have a boot directory, so I had to create one inside the USB stick myself before copying the stage* files)

Regards.

----------

## the_isz

 *mani001 wrote:*   

> the_isz,
> 
> I followed your instructions and the computer boots...but only until the grub prompt. Am I missing something?
> 
> (I tried with the "install-amd64-minimal-2008.0-r1.iso" and, just in case it matters, it doesn't have a boot directory, so I had to create one inside the USB stick myself before copying the stage* files)
> ...

 

Hi Mani,

sorry for not having answered but I was rather busy in the past days.

Also, it has been quite a while since I wrote the respective message, but of course I'll do my best to help you. As you might have seen, I used the x86 minimal iso, while you are using the amd64 one, so that might be a good guess to try out. Otherwise, I need some more information to be able to help you. What exactly is going wrong? If I'm guessing right (I can't do more with the information given), you're presented a plain grub console, which doesn't help you much without knowing what to enter. The reason for this is that the iso file you downloaded doesn't have a grub config file (which would have been located in the boot directory that you created). Again, it might be a good idea to try the x86 minimal iso. If that one doesn't have a boot directory either, you should probably stick with the other solutions not based on grub, or you have to figure out how to create an own grub config file (or alternatively learn how to use the grub console, which is pretty much the same :) ).

I hope that helps you for now, otherwise, let me know.

Greetings

----------

## mani001

Thank you very much the_isz...and sorry for the delay   :Embarassed: 

Your guess is correct: the problem is I only can see a plain grub console...and I'm not much of a grub guru   :Rolling Eyes: 

In the end I tried the original solution posted by theDuck and it worked like a charm with the amd64 minimal...so I guess we can call this a solved issue. Another job well done   :Very Happy: 

Greetings.

----------

## the_isz

Glad I could help... if I did  :Very Happy: 

----------

## user118696

Maybe you should update the official LiveUSB documentation.

I needed to create a bootable USB key to install Gentoo on a "removable media"-less netbook and thought while reading it that FAT16 was a bit old fashionned... finally found this useful post. Thank you.

----------

## thecooptoo

thanks - i too want to try gentoo on my Aspire One. 

IWhen I put the USB stick  into the Aspire machine and change the boot order , the USB drive flashes several times 

and  i get a grub screen. 

Is it possible to make an image of the install-minimal bootable pendrive that works for someone available  ( Id host it )

----------

## microtechno

thanks heaps the_isz

I have been trying to get gentoo on my eee pc 1000 for a while. Followed a few diffrent installs and nothing worked. You have done the trick.

microtechno

----------

