booting scsi harddrive from 9.04 usb key

Asked by Eugene Worley

I prepared a live usb flashdrive using 9.04 live usb creator. It works fine on my Acer extensa laptop except that when I select "boot from first hard drive" It takes me back to the flaskdrive menu. I suspect that it is reading my usb key as hd0 and the internal hard drive as hd1. Is there a way that I can modify either grub or the syslinux system to allow me to boot from the internal harddrive with the USB key installed. I need this for my new virus control system (which is 99%) virus proof to operate in a user friendly manner.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Vihar
Solved:
Last query:
Last reply:
Revision history for this message
Vihar (vmankov) said :
#1

Well couldn't you manage boot sequence through BIOS?

Revision history for this message
Eugene Worley (meangenegjco) said :
#2

To Vihar:
The bios is the problem. When a usb flashdrive is plugged in it reads the flashdrive as hd0 and the internal hard drive as hd1, When you select "boot from first harddrive" it takes you to the flashdrive and you get the live cd boot menu again.

Revision history for this message
Vihar (vmankov) said :
#3

So there probably has to be an option in your BIOS which is telling which of the hard drives to be first bootable and there you could change the order of booting from the hard drives. Try looking around on the same page of BIOS and then on another.

Revision history for this message
Eugene Worley (meangenegjco) said :
#4

I've already tried it there is nothing there short of writing and loading a whole new cmos which is totally beyond my capability. The easier solution is to load a new grub bootloader onto the flashdrive or possibly onto the hard drive. However, I need step by step instructions on how to do this. Another possibility would be to replace grub with lilo but I am having problems getting that to work.

Revision history for this message
Vihar (vmankov) said :
#5

Eugene wrote:
"The bios is the problem. When a usb flashdrive is plugged in it reads the flashdrive as hd0 and the internal hard drive as hd1, When you select "boot from first harddrive" it takes you to the flashdrive and you get the live cd boot menu again."

So what if you choose in BIOS "boot from SECOND harddrive"? Wouldn't it boot from the internalHD?

Revision history for this message
Eugene Worley (meangenegjco) said :
#6

to vihar:
The bios on my laptop doesn't have boot from second hard drive as a choice since there is only room to install one hard drive internally. The only other possible choice for a second hard drive is boot from usb hard drive which reads the Usb flashdrive when it is plugged in. Isn't a way to edit the last line of /media/disk/syslinux/text.cfg so that it will send the boot signal to the second hard drive instead of the first hard drive. If that isn't possible then I need to know how to grub or lilo to provide an adequate work around.

Revision history for this message
Best Vihar (vmankov) said :
#7

Eugene,
would you please "bump" your question up with a new post in the thread?

I'm thinking of one issue but I'm not sure so wait for others to say something, if they know more.

After that if there is not an answer I'll try it my way...

Revision history for this message
Eugene Worley (meangenegjco) said :
#8

I discovered the answer in the grub man pages and two or three tries to get it right. The solution is as follows. Log in as root on the hard drive. Using the file browser, I navigated to root home file and created a folder entitled grubbackup. I then copied /boot/grub/device.map and menu.lst to /root/grubbackup. I changed /boot/grub/device.map to read as follows:
(hd0) /dev/sda
(hd1) /dev/sdb

I then opened the text editor and created the following menu.lst file:

#menu.lst for booting from flashdrive

default 0
timeout 15

color cyan/blue white/blue

title Ubuntu 9.04 USB
root (hd1,0)
makeactive
chainloader +1

title Ubuntu 9.04, HDD
uuid 36c8e05c-fb41-42b5-802c-215a1ba4256d
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=36c8e05c-fb41-42b5-802c-215a1ba4256d ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet

title Ubuntu 9.04, HDD (recovery mode)
uuid 36c8e05c-fb41-42b5-802c-215a1ba4256d
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=36c8e05c-fb41-42b5-802c-215a1ba4256d ro single
initrd /boot/initrd.img-2.6.28-15-generic

I then set the bios to find the internal hard drive and used the hard drive mbr to boot the flashdrive. This works since the grub bootloader sees the syslinux loader as a windows operating system. The one minor problem left is that I will have to manually update menu.lst when the kernal on the hard drive is updated but I doubt that there is anything I can do about that.