Discussion:
(off-topic?) boot LFS from USB: usb module + device available on GRUB ??
Pedro Salazar
2003-06-17 21:02:51 UTC
Permalink
Greetings,

I have a USB pen drive that I can mount it on /dev/sda1, and I have on
it already a LFS installation, Now I would like to boot from it.

I'm trying to use the GRUB and I already mapped my usb device with hd1
on /boot/grub/device.map:

(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/sda <---- HERE!

However, even I have access to the USB device from grub shell on my
system, at boot I can't map to the USB storage to hd1!!

root (hd1,0)
21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name
refers to a disk or BIOS device that is not present or not recognized by
the BIOS in the system.

**
I'm thinking that if the USB module isn't loaded then the USB device is
also unavailable! So, how can we boot from a flash device?

BTW, my board is USB bootable but the GRUB isn't loaded by the USB flash
rather is loaded by hard drive. I already configured the boot order in
the BIOS. Isn't possible to boot from USB flash device?

thanks,
Pedro Salazar

P.S.- My case is GRUB, but I know LFS is documented with LILO. However,
the issue here (LFS+BOOT+USB) applies to both, LILO or GRUB, right?
--
PS
pedro-b-salazar at ptinovacao.pt
PGP:0E129E31D803BC61
--
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message
Rainer Peter Feller
2003-06-18 07:03:21 UTC
Permalink
Post by Pedro Salazar
Greetings,
I have a USB pen drive that I can mount it on /dev/sda1, and I have on
it already a LFS installation, Now I would like to boot from it.
I'm trying to use the GRUB and I already mapped my usb device with hd1
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/sda <---- HERE!
However, even I have access to the USB device from grub shell on my
system, at boot I can't map to the USB storage to hd1!!
root (hd1,0)
21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name
refers to a disk or BIOS device that is not present or not recognized by
the BIOS in the system.
**
I'm thinking that if the USB module isn't loaded then the USB device is
also unavailable! So, how can we boot from a flash device?
BTW, my board is USB bootable but the GRUB isn't loaded by the USB flash
rather is loaded by hard drive. I already configured the boot order in
the BIOS. Isn't possible to boot from USB flash device?
thanks,
Pedro Salazar
P.S.- My case is GRUB, but I know LFS is documented with LILO. However,
the issue here (LFS+BOOT+USB) applies to both, LILO or GRUB, right?
hm ... I think your bios emulates a floppy when it boots from usb ... so
you should use grub also from usb and have a look at what is there (fdd or
hd0 or something else), or you have to modyfy grub to make it understand
your usb ...
I don't suppose grub to use any linux driver.

H
CUH Rainer Peter Feller
H
--
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message
Ryan.Oliver
2003-06-18 08:08:32 UTC
Permalink
Does your initrd image contain scsi, usb mass storage, scsi generic?

The bios may know of the usb storage as a "floppy disk", but does the
booting kernel have the modules loaded to actually see /dev/sd0?

[R]
--
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message
Pedro Salazar
2003-06-18 11:16:06 UTC
Permalink
Post by Ryan.Oliver
Does your initrd image contain scsi, usb mass storage, scsi generic?
The bios may know of the usb storage as a "floppy disk", but does the
booting kernel have the modules loaded to actually see /dev/sd0?
Yes, I have the usb modules in the initrd (created through mkinitrd
command). But my problem is the booting from the USB device is Geom
Error:

Geom Error

The location of the stage2 or stage1.5 is not in the portion of the disk
supported directly by the BIOS read calls. This could occur because the
BIOS translated geometry has been changed by the user or the disk is
moved to another machine or controller after installation, or GRUB was
not installed using itself (if it was, the Stage 2 version of this error
would have been seen during that process and it would not have completed
the install).

Maybe this could be an issue for a GRUB mailing list... However, I'll
describe how I created my boot device (this is totally *off-topic*, and
I sorry for that):

1- I mounted the /dev/sda1 (ext3) on /mnt/flash

2- I copied all my LFS to /mnt/flash

3- My /mnt/flash/boot/grub/device.map

(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/sda

4- I executed:

grub --config-file=/mnt/flash/boot/grub/grub.conf \
--device-map=/mnt/flash/boot/grub/device.map

grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83

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... no
Running "install /boot/grub/stage1 (hd1) /boot/grub/stage2 p
/boot/grub/grub.conf "... succeeded
Done.

5- I booted on my host with USB boot device, and ...Geom Error!


Any help would be appreciated...

thanks,
Pedro Salazar.

P.S.- I can boot with a boot device created through the command
"mkinitrd --device /dev/sda1 <kernel>". But apparently this is not grub
rather is syslinux!
--
PS
pedro-b-salazar at ptinovacao.pt
PGP:0E129E31D803BC61
--
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message
Pedro Salazar
2003-06-18 16:09:37 UTC
Permalink
Greetings,

I'm trying to install LFS on USB pen drive and boot from it also.
However I haven't managed to boot with GRUB or LILO.

With LILO I got a bundle of 0 and 1 on the screen and with GRUB I got a
Geom Error. I don't think that has anything about the USB or SCSI
modules. It will, but only after when to boot the kernel, not before.

The strange thing is that I can boot with a syslinux (used in
mkbootdisk).

My device is /dev/sda that has one ext3 partition (/dev/sda1).

lilo.conf:

oot = /dev/sda
delay = 40
lba32
read-only
image = /boot/lfskernel
label = lfs
initrd = /boot/lfsimage
read-only
root = /dev/sda1

on grub I have the /boot/grub/device.map with:
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/sda

and I initialize the grub with:

grub --device-map=/mnt/flash/boot/grub/device.map

grub>root (hd1,0)
grub>install --force-lba (hd1,0)/boot/grub/stage1 (hd1)
(hd1,0)/boot/grub/stage2 (hd1,0)/boot/grub/grub.conf


Any hint would be appreciated!!

thanks,
Pedro Salazar.
--
PS
pedro-b-salazar at ptinovacao.pt
PGP:0E129E31D803BC61
--
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message
Loading...