Boot your (bootable) USB directly from grub

Long time, and I hit across this one scenario, and yay – we have this blog post here!

Scenario
Pretty old machine with a Linux installed, and working grub, and I wanted to install another Linux variant! I got my bootable USB drive ready, but the stupid machine was not detecting it during boot-time I guess, as it never had mind to boot from it.

Similar situation can come up when you forgot the BIOS password, making it difficult for you to change the boot order. So here you go!

Steps
Let me put in steps, so that easy for someone (or even myself) to copy later!

  1. Insert your USB drive, boot normally, go to Grub command line – This might be probably a click of ‘c’ from the Grub menu! You will be in somewhere like
    grub>
    
  2. Type in ls and find out the correct USB drive notation and partition. In my case, it was (hd1, msdos1) You can simply find the correct one by typing in ls (hdx,msdosy)/ or similar
  3. Now we have the partition, lets try booting from it! This is the tricky step, and here you go!
    set root=(hd1,msdos1)
    linux /casper/vmlinuz.efi boot=casper noprompt noeject root=/dev/sdb1
    initrd /casper/initrd.lz
    boot
    
  4. TADA! Here you go! If you see a prompt like
    (initramfs)
    

    You have done something seriously wrong 🙂 Take time to go all the way from top till down again, and if it still dont work out, kindly comment!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s