LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-29-2006, 06:31 PM   #1
Thames
LQ Newbie
 
Registered: Mar 2003
Location: London
Posts: 20

Rep: Reputation: 0
Booting to Linux on an external usb drive using xp loader


Hi All
At present I have Lilo installed on the boot partition of my Linux distro which I access from the XP bootloader.
I am considering buying an external USB HDD and transferring Mandrake or an updated version to the new hardrive.
Does anyone know if I will have any problems using the same boot sequence.? ie transfering the boot sector from the linux boot sector and making it available as a file for the Xp loader to read.
Presumably xp will recognise the new hardrive etc.
At present I have one 80GB hardrive with Win95, WinXP, and then Linux with various partitions
I would appreciate some advice as my knowledge of USB devices is v. little. Thanks alot

Thames
 
Old 12-29-2006, 08:28 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I use my XP loader to start GRUB, and then let GRUB boot my USB drive. I'd suspect that you could do that with your system -- using LILO -- too.

In fact, I suspect that that's what you're actually doing. As far as I know, unless you got XP to load the Linux initial ram disk, XP won't boot Linux directly. Most people opt for making a copy of a Linux MBR in the XP C: drive, and having XP boot that, which starts a Linux loader to handle the rest of the boot.

By he way, I got my USB drive enclosure from CompUSA for $20. When I tried to boot it directly from my BIOS, it wouldn't work, and GRUB refused to install on it. I finally figured out that the problem was that the thing was USB v,1, not 2. But it works fine when booted from the GRUB MBR image on the XP drive.
 
Old 12-29-2006, 09:06 PM   #3
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Whether or not you can boot from a USB device depends on your BIOS. Reboot your PC, press Del or F12 or whatever key is appropriate to get into BIOS, then take a look at the boot sequence options. If the USB device is offered as an option, move it to the top of the list, and then anytime you've got a bootable USB attached, your PC will boot from it before it tries to boot from the CD or internal hard drive, etc. If it does not appear as an option in your boot sequence, then realistically it won't work. Good luck with it
 
Old 12-30-2006, 01:05 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by J.W.
Whether or not you can boot from a USB device depends on your BIOS. Reboot your PC, press Del or F12 or whatever key is appropriate to get into BIOS, then take a look at the boot sequence options. If the USB device is offered as an option, move it to the top of the list, and then anytime you've got a bootable USB attached, your PC will boot from it before it tries to boot from the CD or internal hard drive, etc. If it does not appear as an option in your boot sequence, then realistically it won't work. Good luck with it
Yes, that's true, and USB was offered as an option. However, when I tried to install GRUB on the USB device, GRUB informed me that the BIOS did not support writing to the boot sector of the USB drive. And, after I put a MBR on the drive (after attaching it as an IDE drive to another box), the BIOS (of the Gateway laptop) would not boot it.

But this is way of the o.p.'s topic, and not a problem for me since I can boot the USB drive via GRUB.
 
Old 12-30-2006, 02:48 PM   #5
Thames
LQ Newbie
 
Registered: Mar 2003
Location: London
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for both of your replies.
Unfortunately my Bios does not have an option to boot from a USB device.
If I understand you correctly PTrenholme, you are suggesting I keep a version of Linux on my existing drive and modify Lilo to give me the option of either booting the USB drive directly (if possible) or an option to boot via another bootloader -GRUB OR LILO- on the new Linux system installed on the USB drive. I would have to research either option. Modifying lilo

I have of course enough room to fit another internal drive and may well do that. An external drive would just give me extra possibilities of transfering data to other machines.
Thanks once again.

Thames
 
Old 12-31-2006, 12:17 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Well, not exactly. I suggested that you keep a Linux on your existing drive, or, at a minimum, the /boot directory tree. The /boot tree is not, actually, that large, and it can be in, for example, a 1 Mb FAT partition.

Then you have two options. The first, and easiest, is to set your MBR to use LILO to boot using that /boot partition, and let it boot the other OSs, including the USB Linux. The other alternative is to get the first option working and then copy that working MBR to a file which Windows can use to start LILO, and then let Windows replace the MBR with its own, limited, boot system.

Most of what I discussed concerned the second option, and how to accomplish it. The first option is actually easier. Just create a small (1 to 10 Mb) FAT partition on one of your attached hard drives, and then install Linux on the USB drive, selecting the FAT partition for /boot and the USB drive for all the rest.

Note, however, that you may be able to directly boot the USB drive. When you say that your BIOS does not give you a option to boot from a USB drive, did you have such a drive connected when you checked? It may be that the option was not displayed because it's only available when there is a USB drive present in the system.

You should check to see if here is a BIOS upgrade available for the mother board installed in your system. Most M/B manufacturers provide free upgrades when they become available.

Also note that, if you do it the way I've suggested, your USB Linux may not be bootable on some other system, since its /boot partition is on your (non-portable) Windows system.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
booting 11.0 off external usb drive jmille34 Slackware 2 11-18-2006 01:43 PM
Booting from cd, linux on external usb hard drive ruh31 Linux - General 6 05-09-2006 07:12 AM
booting linux from a usb external drive dr_zayus69 Linux - Hardware 4 08-18-2005 05:57 AM
booting knoppix via external usb cd drive Kirmonkey Linux - Laptop and Netbook 0 04-24-2005 06:07 AM
Which boot loader for an external USB drive aikempshall Slackware 2 04-06-2005 06:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration