Tag Archives: boot

How to copy .img files to floppy with DD

If you are into retro computing and need to copy one of the old floppy .img disks to a diskette then it can be done with dd for unix/linux or by using the windows port of dd

My son learning to code Power Basic for DOS and switching floppies 😉

In my case i had 2 computeres with a floppy drive, one was a Windows XP machine and the other was a much older DOS computer without USB or network and i need to test FreeDOS and MS DOS 6.2 but i only had files like disk1.img downloaded from the internet and blank 1.44 floppy disks.

In my first attempt i tried to use a Windows program called winimage but it was not able to run on the old Windows XP, maybe it needed a servicepack or somthing else, so the fastest way was to find a simpler and faster solution and dd came in to my rescue.

here is How to copy a disk.img to floppy with dd

Unix/Linux

dd if=disk1.img of=/dev/fd0

Windows (DOS or CMD Console)

dd if=disk1.img of=\\?\Device\Floppy0

It can be downloaded at http://www.chrysocome.net/download

OR from my server https://www.pvangsgaard.com/download/dd-windows/

How to Boot Raspberry Pi from USB Hard Drive

Raspberry Pi’s normally boots from a SD/Micro SD card. That also means that your root and home partitions lives on the SD card and there is a lower limit to how big it can be and how fast it is compared to normal Hard Drives and SSD drives. Sometimes it can be better to move all other but the /boot partition to an external Hard Drive.

Here is how to move allready existing partitions to an external drive.

1. First fdisk the drive and create an EXT4 filesystem

FDISK

fdisk /dev/sda
delete existing partitions
create new Primary Linux partition as /dev/sda1
write the system to disk with the command w
exit fdisk 

CREATE FILESYSTEM

mke2fs -t ext4 /dev/sda1

2. Mount the External Harddrive on your Raspberry Pi

sudo su
mount -t ext4 /dev/sda1 /mnt

3. Install rsync

sudo apt-get install rsync

4. Copy all the files from the microSD card to the external hard drive. By using rsync then all file permissions and ownership are keept intact.

sudo rsync -axv / /mnt

this will take a while to finish.

5. Then we need to modify the Raspberry Pi’s startup file, Your device will look for it on the SDCard in the /boot partition

nano /boot/cmdline.txt

We need to edit two parts of this line. Change the root= to /dev/sda1, add rootdelay=5

It should look like this

6. Then we are adding the hard drive entry to “/mnt/etc/fstab” so the root folder in the external hard drive is automatically mounted at boot up.

nano /mnt/etc/fstab

Add this to the end of the file

/dev/sda1       /               ext4    defaults,noatime  0       1

Comment out the line with the SDCard with a # so it look like this

#PARTUUID=c1c4201a-01  /               ext4    defaults,noatime  0       1

After the changes, it should look like this (here is a screenshot from one of my Pi’s)

Reboot your Pi, and it should boot up and run from the external hard drive. One thing to note is that the microSD card needs to be in its slot, as the Pi needs to read the startup file from it before it boots up on the drive you wan’t

It is also possible to boot without the SDcard, but this way is how i prefer it to be done as it is very easy to switch back to the SDcard…just change the

Here is how the result can be with an External 1 TB USB Hard Drive.