nikster Posted October 22, 2007 Share Posted October 22, 2007 How do I get grub to put its config files on an alternate partition? Grub has its config files in /boot/grub/menu.1st or something like that - no problem. But what if I am booted into Windows and don't see the linux partition? Or what if - as happened to my friend - I installed Ubuntu on an external hard drive? It will happily install but forget to tell you that from now on, you better have that external HD plugged in or _nothing_ will boot! As that's a notebook, that's impractical. I searched the interweb for about 20 minutes but could only find very cryptic and unclear instructions on how to tell grub that the config files are in another location. It was also very unclear if the config files can be on a NTFS formatted volume. The idea that my friend had was to install ubuntu on an external HD so just in case everything is screwed, he can go back to Windows. What he got instead was a black screen with a blinking cursor and a grub error message. I am aware that we can either boot with the external HD plugged in or alternatively use a WinXP install disk to wipe grub from the system. But I would want to know how one can reasonably install ubuntu on a USB stick or external HD... Link to comment Share on other sites More sharing options...
jackk Posted October 23, 2007 Share Posted October 23, 2007 I prefer the USB installation because when travelling with my laptop in case of any problem I can fix it right away. You'll find everything you need there: http://www.pendrivelinux.com/ I don't use Ubuntu on USB but DSL (DamnSmallLinux) as it takes only 50Mb Link to comment Share on other sites More sharing options...
nikster Posted October 23, 2007 Author Share Posted October 23, 2007 thanks jackk, the above also has instructions for ubuntu though it's not as easy as clicking "install". it takes some contortions for ubuntu to run on a usb stick and at save preferences too... which is too bad... Link to comment Share on other sites More sharing options...
autonomous_unit Posted October 27, 2007 Share Posted October 27, 2007 This is particularly complicated because booting requires the help of the BIOS, and what Grub really needs to know is what the "BIOS drive number" and "disk block location" is for its additional boot files. Many BIOSes will change the disk numbering depending on what devices are plugged in and what boot-order priorities are set in the BIOS config, and the exact layout on disk will be different each time you install the OS, so you cannot have one bootloader work with either internal or external drives unless you do an exact disk-cloning step which will probably cause other problems... While a typical Linux installer will try to detect this numbering when it installs Grub, it is lost when the numbering changes on a reboot with different disks attached. This is one reason why neither Linux nor Windows really support system installs on USB media very well (if at all). To make a USB rescue system, I've set the BIOS to make the USB drive the primary boot drive if it exists. Then, I've installed Grub to the USB disk and set it with its own /boot partition and / partition. Then, I've disconnected the USB drive and done the same thing to have a normal OS install on the internal hard drive. Both installs think they are "BIOS drive 0" and so the system boots its internal drive when the USB drive is absent, and it boots the USB drive when it is present. An optional step is to make either system be able to access the other disk once booted... As I recall when I did this several years ago, it took me several steps of installing the systems and running manual Grub commands at the grub shell prompt (to finish tweaking things based on the correct drive-numbering, because the Fedora installer got it wrong w/ the USB drive). Personally, I found it was more trouble than it was worth, so I just keep a rescue CD around for fixing systems, rather than trying to run a system on an external drive. Now I just use the external disk for backup files etc. and do not keep it bootable. Link to comment Share on other sites More sharing options...
RKASA Posted October 27, 2007 Share Posted October 27, 2007 I presently run my Linux from a USB drive the same way and for this PC it works, but in the other forum its been a problem for alot of PC's to do the same. with card reader etc it seemed to be even worse. drive assignments change at a pin drop. I found puppy linux running a usb stick for home,swap, and settings worked real well. Run the live cd with the stick in and it acts like a full install. it was easy to set up with a GUI just tell it how big a swap you want. and bingo. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now