2

I tried installing debian on a USB stick. I believed I made a mistake with the grub boot up part. I want to leave my harddrives alone and with my bios choose to boot up from a stick. Do I need grub if linux is the only OS on my stick?

I believe I selected the USB drive I was using but I think the next step asked about /dev/sdX which I left as blank (didn't I just say install for that drive...). I'm not sure how to know which sdX it is because I'm install from a USB stick as well with the same name.

  • Usually when you turn a linux livecd iso to a live usb stick with something like pendrive linux you just set the bios boot order and that's it. Not one thing touches the hdd so there's certainly no need to install grub anywhere. If you decide to start the installer (if available) at that point, and you install to the disk, grub will become the boot loader and should be able to show you a boot menu with all your OSes. So how did you make that USB stick and where does it ask questions about specifying a drive for mbr install? – user44370 Aug 10 '13 at 21:48
  • @illuminÉ: I believe I used dd if=iso of=/dev/sdb/ then booted up said usb stick. After it copied or 'installed' the files to the USB it had some kind of GRUB setup phase which I thought was weird. I can't boot up the USB – user4069 Aug 10 '13 at 22:58
  • oh, you're doing that on linux/osx. From the very limited xp I have, I don't trust dd on osx, could never make anything bootable out of it. I've created a live-usb from linux only once I think with uunetbootin, otherwise i've always used the pendrive tool in windows and never tried from scratch in linux - surely you must be using an iso that is already tailored for usb. I think the issue is making it bootable not grub, but again, newbie here. You may find this useful. Good luck! – user44370 Aug 11 '13 at 2:11
  • Well the installer on the usb is working fine. The USB I install the distro on is not. I'm completely sure it's because grub doesn't know what to do with it – user4069 Aug 11 '13 at 4:07
0

From https://askubuntu.com/a/111080/4482


Thumb drive appears as /dev/sdb

Run these commands

sudo mount /dev/sdb1 /mnt
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt/$i;  done
sudo chroot /mnt
grub-install /dev/sdb
update-grub

Then edit /boot/grub/grub.cfg Changed all lines that say (hd1,1) to (hd0,1)

note by acidzombie I ignored what is to the right of the comma and it said sdb for me instead end note

Then run...

exit
for i in /dev/pts /dev /proc /sys; do sudo umount /mnt/$i ; done

Next.

  1. List item
  2. Totally power down the server.
  3. Pull the power cords out. Wait 10s.
  4. Plug power back in.
  5. Insert Thumb drive and power on.
  6. Linux now boots fully from the thumb drive.

It seems that there were two problems. They were to do with having the wrong device referenced in grub.cfg (i.e. hd1 should be hd0).

Secondly, a bug in the server bios. It kept referring to a uuid for a filesystem on a different thumb drive that I'd be earlier playing with. Warm reboot seemed to keep that uuid in there. A cold boot fixed it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy