bdisk/docs/manual/boot/HOWTO.adoc

8.6 KiB
Raw Blame History

How to Netboot BDisk

I update this server with images and iPXE images you can use to netboot my personal spin of BDisk.

You can download a demo of the iPXE functionality. Note that your computer needs to be connected to a valid Internet connection via ethernet and be able to get a DHCP lease for it to work.

Note
Advanced users, you can verify it against the GPG signature (ASC, BIN). My key can be found in ASC or BIN format. Proofs of identity can be found in the footnotes of this blog post. Note that while this project is in flux, I may be signing with temporarily-generated throwaway keys.

Once downloaded, you can follow the appropriate steps based on your operating system:

Windows

CD/DVD

Simply put a blank CD/DVD-R (or RW, RW+, etc.) in your optical media drive. Find where you downloaded the above file (it should be named bdisk-mini.iso). Right-click and select Burn disc image.

USB

Youll most likely want to download a program caled USBWriter. Unzip it (or just open it via double-clicking) and copy the USBWriter.exe program somewhere youll remember- your desktop, for instance.

Next, make sure your USB stick is inserted in your computer and formatted/"initialized" already.

Warning
Formatting a disk/partition will destroy any and all data on that device! Make sure there is nothing on your USB drive you want to keep, as formatting BDisk to it will delete any data on it.

Now right-click on the USBWriter icon and select Run as administrator. You may get a warning pop up asking for permissions for USBWriter. Its safe to click Yes.

Select the proper USB flash drive from the Target device dropdown menu. If your USB drive isnt showing up, try clicking the Refresh button and looking again. (If it still doesnt show up, you may need to reboot your computer.)

Click the Browse… button and find where you saved bdisk-mini.iso. Once youve found it, double-click it. Then click Write. It might take a little bit of time depending on how fast your USB interface is, so give it some time. When it finishes, click Close. You now have a bootable USB thumbdrive.

Booting

Booting differs depending on each and every hardware, but typically you should get a message when you first start up for "Setup" and/or "Boot options" or the like. The terminology differs here. It will probably be an F# button (usually F2, F4, F10, or F12) or the Delete key. While rebooting, try to hold or press repeatedly this key and you should come across an option somewhere with a list of devices to boot from or an order you can set. Make sure the USB (or CD/DVD, whichever media type youre using) is set as first, and save.

Mac OS X/macOS

CD/DVD

Unfortunately, the OS X/macOS Disk Utility doesnt work with hybrid ISOs (what bdisk-mini.iso is). At all. Youre out of luck, Im afraid, unless you happen have a spare USB thumbdrive handy.

USB

Well need to get a little messy with this one.

Open Applications ⇒ Utilities ⇒ Terminal. A black box should pop up.

Insert your USB stick now (if you havent already) and run the following command:

diskutil list

You should see an entry, probably near the bottom, that looks something like this:

...
/dev/disk42 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *8.2 GB     disk42
...
Caution
Be sure to find the disk that matches the size of your thumbdrive! If you use the wrong disk identifier, it will break your OS X/macOS install at best and delete all your data at worst!

Now that youve found which disk your USB device is (the /dev/disk# part), we can continue. Make sure that it is the disk ID right above the line that contains your flash drive size! For our example, I will use /dev/disk42 as an example as its highly unlikely youll have that many disk IDs, but be sure to replace this in the following commands with the proper disk ID you found above.

Then we need to unmount the disk, in case its already mounted.

diskutil unmountDisk /dev/disk42

Assuming you saved BDisk Mini to your Desktop, you can do:

sudo dd if=~/Desktop/bdisk-mini.iso of=/dev/disk42
Note
the above command may prompt you for a password. This is the same password you use to log into your Mac (and unlock the screensaver, etc.). No characters will show up when you type (for security reasons, in case someone is behind you watching your screen) so it may take you a couple tries.

This will run for a couple seconds. When it finishes, you should see something similar to (but not necessarily the same numbers as) this:

0+1 records in
0+1 records out
169 bytes transferred in 0.000530 secs (318865 bytes/sec)

At this point you may get a popup warning you "The disk you inserted was not readable by this computer." If you do, just click the Ignore button.

One last step. Still in Terminal:

diskutil eject /dev/disk42

You can then close Terminal.

Booting

The instructions here dont differ too much than from Windows, though its always the same key. For OS X/macOS hardware, I believe its the c key or the b key. From it being in a shutdown state, power on your Macbook Pro (or whatever it is you have) and hold the c key if its CD/DVD. The b key should bring up a boot menu that will let you select a USB device to boot from (I believe the "b" menu will let you boot from a CD/DVD as well).

Strangely enough, you should still be able to boot a BDisk Mini CD/DVD, you just cant burn one. Im tempted to make a cheap dig at Apple, but Ill refrain.

GNU/Linux

CD/DVD

Easy. Most (if not all) of these should support burning bdisk-mini.iso to disc (Im partial to cdrecord). If you prefer a GUI, try some of these instead (I like k3b).

USB

Very similar to OS X/macOS in approach. First open a terminal emulator- the ways of navigating to it depends on your window manager/desktop environment, but its usually under a System or Utilities menu.

Now we need to find which disk our USB thumbdrive is.

sudo fdisk -l

You should see a device matching your USB thumbdrives size. In our example, I use /dev/sdz as its unlikely you have that many disks attached to a system, but be sure to replace this in the following commands with the proper disk ID you find.

...
Disk /dev/sdz: 7.6 GiB, 8178892800 bytes, 15974400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
...
Caution
Be sure to find the disk that matches the size of your thumbdrive! If you use the wrong disk identifier, it will break your GNU/Linux install (or possibly Windows install if youre dual-booting, etc.) at best and delete all your data at worst!

Make sure it isnt mounted:

umount /dev/sdz

You should get a message that says umount: /dev/sdz: not mounted. If it was mounted before, its unmounted now.

Next, simply dd over the ISO file.

sudo dd if=~/Desktop/bdisk-mini.iso of=/dev/sdz
Note
the above command may prompt you for a password. This is the same password you use to log in (and unlock the screensaver, etc.). No characters will show up when you type (for security reasons, in case someone is behind you watching your screen) so it may take you a couple tries.

This will run for a couple seconds. When it finishes, you should see something similar to (but not necessarily the same numbers as) this:

75776+0 records in
75776+0 records out
38797312 bytes (39 MB, 37 MiB) copied, 9.01915 s, 4.3 MB/s

If you get a popup from your desktop environment (assuming youre using one) about not being able to mount a disk, or that its unformatted, etc. and it prompts you to format, ignore/cancel/close it- do not format it! This would erase the BDisk Mini image on it.

Booting

Exactly the same as those for Windows. (Unless youre running GNU/Linux on Mac hardware, in which case follow the booting instructions for Mac instead.)