Remove the boot loader from a usb stick

dd if=/dev/zero of=/dev/sdb bs=446 count=1
If you don't want your computer to try to boot form a USB stick that used to be used as a boot device (maybe for a live linux distro), you will have to remove the boot loader from your stick other wise the boot will fail each time the device is attached to your PC.

0
By: dcabanis
2009-06-07 10:29:49

These Might Interest You

  • Quickly reboot directly to Windows (or any other operating system) without the need to enter BIOS/UEFI or boot loader (if any). It's valid for one boot only, no persistent changes to boot priorities.


    0
    sudo efibootmgr --bootnext `efibootmgr | sed -n "s/^Boot\([0-9]\{4\}\)\* Windows Boot Manager$/\1/p"` && reboot
    moneytoo · 2014-05-31 11:51:52 0
  • This wgets the iso directly to the USB device, replace /dev/sdb with the device name of the USB stick. After wget finishes you will be able to boot the .iso file from the USB stick.


    0
    wget -O/dev/sdb ftp://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/mini.iso
    unixmonkey22563 · 2011-06-12 21:58:13 0

  • 0
    genisoimage -o bastion-602-jpa.iso -b boot/syslinux/isolinux.bin -c boot/syslinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -r -R .
    leatherface · 2018-03-30 12:54:26 0
  • Remove all commented lines Remove all blank lines Show the menu Up the delay so you have enough time to select a kernel Remove the quiet so you can watch the entire boot Add a rootdelay for san attached storage booting Show Sample Output


    1
    sed -e '/^$/d' -e '/^#/d' -e '/initrd/ a\ ' -e 's/hiddenmenu//g' -e '/^timeout/d' -e '/default/ a\timeout\t\t15' -e 's/quiet//g' -e 's/splash/rootdelay=60/g' /boot/grub/menu.lst > /boot/grub/menu.lst.new
    z0rk · 2011-06-28 08:03:17 0

What Others Think

I wanna do the reverse. I have an iPod Classic and I wanna make it bootable (boot a Mactel; EFI). Any idea how to write the bootloader on it? Thnx.
commandlinefu · 471 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: