Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with booting "LiveUSB"
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Sat Sep 29, 2007 11:53 am    Post subject: Problem with booting "LiveUSB" Reply with quote

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:
Code:

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?
Back to top
View user's profile Send private message
Ehnvis
Guru
Guru


Joined: 13 Jun 2006
Posts: 305
Location: /dev/random

PostPosted: Sat Sep 29, 2007 12:11 pm    Post subject: Reply with quote

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.
_________________
HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine.
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Sat Sep 29, 2007 3:11 pm    Post subject: Reply with quote

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 :/
Back to top
View user's profile Send private message
niceness
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2006
Posts: 86
Location: NS, Serbia

PostPosted: Sat Sep 29, 2007 5:07 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Sat Sep 29, 2007 11:17 pm    Post subject: Reply with quote

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:)
Back to top
View user's profile Send private message
niceness
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2006
Posts: 86
Location: NS, Serbia

PostPosted: Sat Sep 29, 2007 11:35 pm    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Sun Sep 30, 2007 9:18 am    Post subject: Reply with quote

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 :|
Back to top
View user's profile Send private message
niceness
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2006
Posts: 86
Location: NS, Serbia

PostPosted: Sun Sep 30, 2007 7:30 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Sun Sep 30, 2007 10:31 pm    Post subject: Reply with quote

Ok I run dmesg'ed after trial of mounting and here's what I got:
Code:
[...]
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:
Code:
# 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? :?
Back to top
View user's profile Send private message
jasiu85
n00b
n00b


Joined: 08 Oct 2007
Posts: 38

PostPosted: Sun Oct 21, 2007 9:35 pm    Post subject: Reply with quote

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? :)

Mike
Back to top
View user's profile Send private message
niceness
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2006
Posts: 86
Location: NS, Serbia

PostPosted: Sun Oct 21, 2007 10:00 pm    Post subject: Reply with quote

Maf wrote:
Ok I run dmesg'ed after trial of mounting and here's what I got:
Code:
[...]
Unable to load NLS charset cp437
FAT: codepage cp437 not found
UDF-fs: No VRS found



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

My solution: use ext2 instead of fat :D
Back to top
View user's profile Send private message
jasiu85
n00b
n00b


Joined: 08 Oct 2007
Posts: 38

PostPosted: Mon Oct 22, 2007 12:03 am    Post subject: Reply with quote

niceness wrote:
My solution: use ext2 instead of fat :D


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 :). 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?
Back to top
View user's profile Send private message
niceness
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2006
Posts: 86
Location: NS, Serbia

PostPosted: Mon Oct 22, 2007 7:37 am    Post subject: Reply with quote

jasiu85 wrote:
niceness wrote:
My solution: use ext2 instead of fat :D


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.
Back to top
View user's profile Send private message
tw04l124
Veteran
Veteran


Joined: 03 Oct 2006
Posts: 1478
Location: A t z e l, lower austria

PostPosted: Mon Oct 22, 2007 8:26 am    Post subject: Reply with quote

Hi


May if it works you update the wiki, Thank you.
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Mon Oct 22, 2007 7:41 pm    Post subject: Reply with quote

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

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..
Back to top
View user's profile Send private message
jasiu85
n00b
n00b


Joined: 08 Oct 2007
Posts: 38

PostPosted: Mon Oct 22, 2007 10:12 pm    Post subject: Reply with quote

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

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..


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
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Wed Oct 24, 2007 2:28 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
tcostigl
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2004
Posts: 97

PostPosted: Thu Nov 01, 2007 1:58 am    Post subject: Reply with quote

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

Quote:
Code:
Code:

  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 :>


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:
Code:

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 ?
Back to top
View user's profile Send private message
JackFrost
n00b
n00b


Joined: 09 Jul 2007
Posts: 5

PostPosted: Thu Nov 01, 2007 9:49 pm    Post subject: Reply with quote

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 :)

Greetings JackFrost
Back to top
View user's profile Send private message
93nt00r0ck5
n00b
n00b


Joined: 17 Jul 2004
Posts: 35

PostPosted: Tue Nov 06, 2007 5:22 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Tue Nov 06, 2007 8:37 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
93nt00r0ck5
n00b
n00b


Joined: 17 Jul 2004
Posts: 35

PostPosted: Tue Nov 06, 2007 9:12 pm    Post subject: Reply with quote

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 ;)

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 :D

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
Back to top
View user's profile Send private message
Maf
Apprentice
Apprentice


Joined: 15 May 2005
Posts: 278

PostPosted: Wed Nov 07, 2007 4:10 pm    Post subject: Reply with quote

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

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..


Lol I unconsciously did the same thing as in quoted text, and it still doesn't work, kernel panics! :)
Can you help me how to figure out correct root for me?
Back to top
View user's profile Send private message
Tolstoi
l33t
l33t


Joined: 20 May 2004
Posts: 645

PostPosted: Thu Dec 20, 2007 9:45 pm    Post subject: Reply with quote

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

The MinimalUSB works :)

Greetings JackFrost


Where die you find that line "cdroot=/dev/sdb1", Mr Frost :D ? Maybe I'm too tired but I can' see it. Found the other stuff though.
Back to top
View user's profile Send private message
theDuck
n00b
n00b


Joined: 11 Jan 2008
Posts: 3

PostPosted: Fri Jan 11, 2008 9:05 pm    Post subject: Howto create a Gentoo 2007.0-r1 LiveUSB Reply with quote

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:

download iso image (I used "install-x86-minimal-2007.0-r1.iso"). Then:
Code:
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! :P


Last edited by theDuck on Fri Feb 08, 2008 8:09 am; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum