UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I install Ubuntu to /dev/sda, all works well. However, when I install Ubuntu to an SD card on /dev/sdb or a USB memory key on /dev/sdc, it still puts GRUB on /dev/sda. I didn't see any option to change that. What's really annoying is /dev/sda becomes unbootable unless /dev/sdb or /dev/sdc is present after that is done. I can fix /dev/sda. But it doesn't accomplish the real goal which is to make /dev/sdb and /dev/sdc independently bootable even when /dev/sda is wiped to binary zero (or otherwise corrupt, or contains something else like Windows).
So how can I get Ubuntu to (1) do NOT touch /dev/sda at all, even if it thinks it sees GRUB already there, and (2) install everything, including GRUB, onto the target device (/dev/sdb or /dev/sdc)?
I know the details of how to do this, and could do it by manually copying data around, etc. I've done such things in Slackware. But I want to do this in Ubuntu AND use Ubuntu's installation tools exclusively. I know I can cheat, after the fact, but that's not what I'm looking for.
it sees my usb as sda, with hd hooked up it would say sdb
then, to make sure, get the grub prompt
grub
root (hd0,0)
setup (hd0)
quit
yeah, now it's simmering
that's it
What's the Bonus of this little cheat??
Grub will always think it's booting the first hd
thus even on a pc/lappy that won't boot from usb
will be able to on most if you use plop bootmanager
on pc's that boot from usb it will again be reconized first and booted 1st
NOTE: when I did this on my HP PC, if I had my bios set to boot from floppy or cd
before hd, I would get a grub error when booting usb
if the bios was set to boot hd 1st, cdrom second, the usb boots right?
Note that in an Ubuntu installation, in the very last screen before installation begins, there's a little button on the lower right, marked Advanced. It gives you the opportunity to install grub somewhere else (and probably to further configure it, I'm not sure.)
If you already knew that, I apologize, but looking at the first post, it seems as if you may have, as I did the first couple of times playing with it, overlooked it.
If I unhook the harddrive, then the SD card will be sda, and if anything in the installation configured stuff to look for stuff in sda, then it won't be doing as intended. I want the SD card to work as sdb, and for everything that might be hard configured to the device node name to do so for sdb and not sda. That way I can put in the SD card and boot from it without accessing sda other than to see what's on it (and elsewhere, to defeat automounting it). Ideally, the only hard part is finding partitions to mount. That should be done by labels or UUID. Then everything else finds stuff by paths which will be as expected when the mounts are right.
example, right now I'm running from my usb on fedora 11 persistent
and my pc sees the usb as sdb1
grub thinks it's first hd
only problem you will have is if you try to boot 1st hd from usb
you'll just reboot into the usb
meaning the only limitation it has is that you will have issues trying to
boot your hd from the sd card, which most people don't care about anyway
just try it dude an you'll see
I got 5 computers in all
3 won't boot from usb
all will boot the ext3 usb with grub
the 3 I have to use plop bootmanager cd, usb, or floppy
look here's my menu.lst and otuput of fdisk -l for usb
Code:
Disk /dev/sdb: 4045 MB, 4045930496 bytes
255 heads, 63 sectors/track, 491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0005318e
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 491 3943926 83 Linux
menu.lst
Code:
title Xtras - Menu
root (hd0,0)
configfile /boot/grub/xtras-menu.lst
title Super Grub DisK
root (hd0,0)
kernel /boot/syslinux/memdisk
initrd /boot/sgd/sgd.gz
title zorOS-3.6 IDE
root (hd0,0)
kernel /boot/syslinux/linuz TOOLSLANG=1 initrd=/boot/syslinux/full.img vga=788 load_ramdisk=1 ramdisk_size=53248 prompt_ramdisk=0 rw root=/dev/ram rootfstype=ext2 apm=off
initrd /boot/syslinux/full.img
title zorOS-3.6 SATA
root (hd0,0)
kernel /boot/syslinux/linuz TOOLSLANG=1 initrd=/syslinux/full.img vga=788 load_ramdisk=1 ramdisk_size=53248 prompt_ramdisk=0 rw root=/dev/ram rootfstype=ext2 apm=off libata.atapi_enabled=1 ide0=noprobe ide1=noprobe
initrd /boot/syslinux/full.img
title Grub bootloader - USB-Menu
root (hd0,0)
configfile /boot/grub/usb/grub-menu.lst
title Grub4DOS USB-Menu
root (hd0,0)
configfile /boot/grub/usb/usb-menu.lst
title PLOP Bootmanager USB
root (hd0,0)
kernel /boot/plpbt
title SystemRescueCD-1.2.2 - Menu
root (hd0,0)
configfile /boot/grub/sysrescue-menu.lst
title Fedora 11 Live
root (hd0,0)
configfile /boot/grub/fed-menu.lst
title Clonezilla Live 2009-jaunty
root (hd0,0)
configfile /live/clonez-menu.lst
title Sidux-2009-02
root (hd0,0)
configfile /boot/grub/sidux-menu.lst
title Mini-PartedMagic
root (hd0,0)
kernel /minipm/bzImage root=/dev/ram0 init=/linuxrc ramdisk_size=100000 vga=791
initrd /minipm/initrd
title PartedMagic - USB-Menu
root (hd0,0)
configfile /boot/grub/usb/pmagic-menu.lst
title ClamAV Anti-Virus LiveUSB
root (hd0,0)
configfile /boot/grub/usb/clamusb-menu.lst
title TinyCore_2.1 with JWM USB-Menu
root (hd0,0)
configfile /boot/grub/usb/tc-menu.lst
title RescuePuppy49 USB-Menu
root (hd0,0)
configfile /boot/grub/usb/pupusb-menu.lst
title NetbootCD 3.1.2 USB Net-install a Major Distro
root (hd0,0)
kernel /boot/kexec.bzI quiet base norestore nolocal waitusb=5
initrd /boot/nbinit3.gz
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.