LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-19-2008, 08:08 AM   #1
Izarf
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Rep: Reputation: 0
boot from usb if not detected by bios


I've run into some problems..
I have an old machine that has usb support, but does not identify any devices at BIOS level. Thus, I need something that will boot my USB-stick running Debian linux 2.6.
How do I do this?

I assume that I need to boot up something (on floppy or cd) that loads usb modules and then boot the usb stick from there. Is this right? exactly how is this done?
 
Old 06-19-2008, 09:10 AM   #2
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Doing a little search I found these tutorials that explains both ways

http://wiki.debian.org/BootUsb

http://www.simonf.com/usb/

Last edited by Larry Webb; 06-19-2008 at 09:17 AM.
 
Old 06-19-2008, 09:26 AM   #3
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
To boot from FDD.

http://www.pendrivelinux.com/2007/11...endrive-linux/

Take from this site.

http://www.pendrivelinux.com/
 
Old 06-19-2008, 04:31 PM   #4
Izarf
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Will take a closer look at your tips. midsummer celebrations (sweden =) ) tomorrow, so computer geeking will have to wait .
anyhow -- thanks!
 
Old 06-19-2008, 06:24 PM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
This may be a dead end if the Bios does not support booting from USB. You should check it first to see if "USB legacy support" has been switched on too because older mobo require it to do the booting.

The reason for the dead end is Linux boot loader has no USB driver and cannot find your USB device. It can only do so if the Bios has arranged it as the first bootable disk. Thus if you plug 6 USB devices into a PC and have one nominated as the 1st boot disk then Grub can see only one and not the other 5 even they are all present.

Don't take my word for it. Put Grub on a floppy. Boot it up and try the command
Code:
geometry (hd0)
geometry (hd1)
geometry (hd2)
etc
to see if the USB devices are visible to Grub.

All the USB devices are visible to Linux after it has been booted because the kernel has the necessary drivers. At boot time it is a different matter for the boot loaders.

If the USB device can be seen by Grub then it will self boot without external aid. In such case just install the Linux in the memory device as though it is a hard disk. Not all Linux installers are written to boot from a USB device as it needs the USB driver included in the initrd.
 
Old 06-19-2008, 06:44 PM   #6
Izarf
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
well, you are right in that grub cannot see the device, and that I need the usb components to be able to see the device.
But how to I create a boot disc that has all this so I can boot my USb device up?
 
Old 06-19-2008, 08:02 PM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I don't think you understand the implication.

If Grub can't see it (so does Lilo) as your USb device is not available from the Bios then putting Grub somewhere is not going to help.

Technically you can put Grub into a bootable medium containing the kernel(2 Mb large) and inird file (4.2 Mb large) and specify the Linux root partition to be from the USB device. This will work but the bootable medium has to be a CD because a floppy can't store 6.2Mb data. By such time the effort of putting Grub in a CD or a hard disk partition and Linux in the USB just to boot the distro is too much effort in my opinion. Technically I am fairly confident it will work out but it is a pig's job.

The steps are (using a hard disk partition)

(1) Install the Linux from a bootable CD into the USB disk, as though it is a hard disk. The Linux once booted up will recognise the USB device.

(2) Create a partition in the hard disk, format it in ext2 (think fat partition also works too) and copy the entire /boot directory from the installed Linux in the USB onto the hard disk partition.

(3) Setup Grub in the hard disk partition.

(4) Amend the menu.lst and to tell Grub the bootable partition is in the hard disk but the "root" of the Linux is in the USB device.

The hard disk will boot up Grub. Grub can then load the kernel and initrd available from the hard disk partition. By such time kernel will recognise the USB and goes inside to complete the booting process. It is a lot of effort to to make the USB to do a small amount of work.
 
Old 06-19-2008, 09:11 PM   #8
Izarf
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
okay, I see what you mean. And that means that if I want to recompile my kernel I have to make a new boot cd?

how could it look like when I make USB as root?

#root (sda1,0) ?


The effort to put in this is definitely not a waste -- it will give me much back(indirectly get an extra week holiday, since I then will be able to work from my old notebook while making a roadtrip to dennmark =) ) (which has do hard disk drive)
 
Old 06-19-2008, 10:34 PM   #9
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
The best way in this case would be to carry a copy of puppy on a cd and mount the usb port and store your data on it or if you have enough room store it in your windows.

Last edited by Larry Webb; 06-19-2008 at 10:35 PM.
 
Old 06-20-2008, 01:59 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
This is my menu.lst of my Debian booting from an internat hard disk partition sda11
Code:
title           Debian GNU/Linux, kernel 2.6.18-6-686
root            (hd0,10)
kernel          /boot/vmlinuz-2.6.18-6-686 root=/dev/sda11 ro
initrd          /boot/initrd.img-2.6.18-6-686
The content of Debian /boot is
Code:
debian:/home/saikee# ls /boot
config-2.6.18-4-686      initrd.img-2.6.18-4-686.bak  System.map-2.6.18-6-686
config-2.6.18-5-686      initrd.img-2.6.18-5-686      vmlinuz-2.6.18-4-686
config-2.6.18-6-686      initrd.img-2.6.18-6-686      vmlinuz-2.6.18-5-686
grub                     System.map-2.6.18-4-686      vmlinuz-2.6.18-6-686
initrd.img-2.6.18-4-686  System.map-2.6.18-5-686
debian:/home/saikee#
I have just inserted a 4Gb USB pen drive and it shows up as sdb1 (device marked in red) as indicated by
Code:
debian:/home/saikee# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       12158    97659103+   7  HPFS/NTFS
/dev/sda2           12159       24316    97659135   17  Hidden HPFS/NTFS
/dev/sda3           24317       36598    98655165    5  Extended
/dev/sda4           36599       60801   194410597+  83  Linux
/dev/sda5           24317       24438      979933+  82  Linux swap / Solaris
/dev/sda6           24439       25654     9767488+  83  Linux
/dev/sda7           25655       26870     9767488+  83  Linux
/dev/sda8           26871       28086     9767488+  83  Linux
/dev/sda9           28087       29302     9767488+  83  Linux
/dev/sda10          29303       30518     9767488+  83  Linux
/dev/sda11          30519       31734     9767488+  83  Linux
/dev/sda12          31735       32950     9767488+  83  Linux
/dev/sda13          32951       34166     9767488+  83  Linux
/dev/sda14          34167       35382     9767488+  83  Linux
/dev/sda15          35383       36598     9767488+  83  Linux

Disk /dev/sdb: 4026 MB, 4026531840 bytes
220 heads, 32 sectors/track, 1117 cylinders
Units = cylinders of 7040 * 512 = 3604480 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1118     3932144    c  W95 FAT32 (LBA)
debian:/home/saikee#
Therefore if I have installed my Debian in sdb1 and put Grub in say in a partition sda2 then I would have to change my menu.lst to look like this (changes in color)
Code:
title           Debian GNU/Linux in pen drive sdb1 (hd1,0) and kernel in sda2 (hd0,1)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.18-6-686 root=/dev/sdb1 ro
initrd          /boot/initrd.img-2.6.18-6-686
In the above I instruct Grub to obtain the kernel and initrd files by the partition indicated by the "root" statement. When the kernel is loaded I specify its root filing system location by the parameter "root=/dev/sda2".

Since /boot directory has Grub inside and so after activating any Grub shell or Grub prompt followed by these two commands my system will become bootable
Code:
root (hd0,1)
setup (hd0)
The above instruct Grub to "source" the system file from 2nd partition of the 1st disk (hd0,1) which is sda2 and set itself up in the whole disk (hd0) which is the MBR of disk sda.

If you put the /boot in a CD the root should be
Code:
root (cd)
That is all.
 
Old 07-01-2008, 04:25 PM   #11
Izarf
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
okay, I start to see what you mean now. However - my intention was to put grub on a cd. so I then just need to copy the /boot dir to the cd and make the partition bootable to make it run?
 
Old 07-02-2008, 06:23 AM   #12
Izarf
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by saikee View Post
This is my menu.lst of my Debian booting ...
Tried all of that. Still the system cannot find the usb device. I also tried to install DSL (Damn Small Linux) on the usb-stick and, created a usb-boot-floppy.
This floppy seem to boot up a small linux kernel that has a usb-module with it so it can find the usb-device and then boot from it. That works.
BUT - I don't want DSL, I want my own system. The problem is that I cannot use the USB-boot-floppy to boot my own debian installation up.

The contents of the usb-boot-floppy is:

Code:
' 3kb
boot.msg 1kb
f2 2kb
f3 2kb
german.kdb 1kb
ldlinux.sys 8kb
linux24 972kb
logo.16 33kb
minirt24.gz 243kb
syslinux.cfg 2kb

The only solution to this, as I see it, is to create my own usb-boot-floppy/cd.
But I have no idea of how this could be done. Is there any one out there that does?
 
Old 07-06-2008, 09:42 AM   #13
angus77
LQ Newbie
 
Registered: Jul 2008
Posts: 2

Rep: Reputation: 0
I've been asking around about the same thing---using a CD (or floppy if necessary) to boot a USB key. There are actually two computers I'd like to do this with, so I'm hoping there's a solution that doesn't involve hard-wiring the partitions into my menu.lst (although I'll settle for that if I have to).
 
Old 07-07-2008, 05:11 AM   #14
Izarf
LQ Newbie
 
Registered: Nov 2006
Posts: 16

Original Poster
Rep: Reputation: 0
yes, same here. I could pretty much do anything for a good solution of this.
 
Old 08-20-2008, 10:05 AM   #15
mickwi
LQ Newbie
 
Registered: May 2007
Location: Uppsala, Sweden
Distribution: Ubuntu 7.04 AMD_64, Slackware 11
Posts: 3

Rep: Reputation: 0
Lightbulb slackware

If you could settle for slackware I've found a guide to make a bootcd.
Slackware "USB Boot CD" HOWTO
I had to modify it somewhat to get it to work with 12.1, but that wasn't so hard. Initramfs instead of initrd, basically.

I tried to make something similar for ubuntu or debian, but with no success. Since slackware doesn't work well with my old laptop I'm gonna try Gentoo next.
 
  


Reply

Tags
bios, usb boot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Boot Into USB? (BIOS won't do it!) VorlonInfoTech Linux - Laptop and Netbook 1 04-21-2007 11:15 PM
Boot from USB stick if no booting USB in Bios 1kyle Suse/Novell 1 03-26-2007 12:24 AM
Booting linux from USB when BIOS cannot boot from USB zani Linux - Laptop and Netbook 0 08-08-2006 01:47 AM
howto boot Suse 9.1 from external usb drive through bios-accessable boot partition McHenner Linux - Hardware 2 09-30-2004 07:27 AM


All times are GMT -5. The time now is 03:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration