Essential and unimportant content

Zillertal 2018

Tyvärr är denna artikel enbart tillgänglig på English.

Autumn walk

Clone MS-DOS/Windows95/98 PATA/IDE hard disks using Raspberry Pi/Linux/Mac OSX

There are two very different ways to clone the old hard disk to another rotating disk or better to a small SSD (with interface-adapter). First method is useful if the source computer is working well and have a spare hard disk connector. Simply connect another disk in slave mode the original computer and copy everything to the new drive. The second method requires removal of the hard disk and a method to attach it to another (modern) computer using a IDE-HDD to USB adapter. One bonus with the last method is that you get a backup-file that can be cloned to more hard disks.

Method 1: (Be careful not to mix old and new disk – it will not help)

1. Get a suitable hard disk with the right interface (not to large because old computers are limited to very small hard disks, usually 8GB but old DOS with FAT16 does only work with 2GB partitions)

2. Configure the disk in slave mode and connect it to the IDE-cable the old computer (Check orientation carefully). Note that 3.5″ disks need separate power connector, but 2.5″ disk usually receives power through the finer pitch IDE-cable.

3. Start computer and check in BIOS that it has been detected properly.

4. Use ”C:\> FDISK” to partition the drive, reboot.

5. Format the drive ”C:\> FORMAT D: /s ” Do not forget /s is very important, makes a copy the system files on the new drive and make it bootable

6 Copy all files and folders over, use COPY or XCOPY. Learn how to use XCOPY with the built in help ”C:\> XCOPY /?”.

Method 2:

1. Remove the source hard disk and attach it to IDE HDD adapter. For 3.5″ disk you usually need a powered adapter or separate power solution. 2.5″ disk can be powered through USB. Check cable orientation carefully. Don’t put the disk down on any metallic parts while it is powered on.

Depending on what computer you have different commands need to be used. I found Linux and Raspberry Pi to be the best host.

2. Connect the USB adapter to a powered USB hub and then to the Raspberry Pi.

3. The source disk is automatically detected and can be found using ‘sudo disk -l’, usually it is found as /dev/sdb or /dev/sdc and it may be automatically mounted which is good since we need to work with is as a block device. check with ‘df’ – is it listed as ‘/dev/sdb1’ or similar unmount the disk with ‘sudo umount /dev/sdb’

4. Copy the whole source disk to a file with: ‘sudo dd if=/dev/sdb of=file.dd bs=1MB’ not that /dev/sdb is used not /dev/sdb1 /dev/sdb is the whole disk including partition table and MBR. /dev/sdb1 is he first partition and /dev/sdb2 is the second.

5. The dd command takes a while but it is possible to check progress from another shell by sending a USR1 signal ‘sudo kill -USR1 PID’. Where ‘PID’ is the process number for dd which can be found with ‘top’ command or ‘pidof dd’ or ‘ps aux | grep -w dd’

6. Now the content of the while disk is stored in disk.dd that you can rename and save for later use.

7. Power down and remove the source disk to begin working with the new.

8. To write the file to the new disk check which device it is connected to with ‘sudo disk -l’

9. Write the file to the disk with ‘dd if=file.dd of=/dev/sdb bs=1MB’, remember to use the correct device name!

11. Sync the disk with ‘sync’

10. Optional the new disk can be mounted and exam’ined partition by partition with ‘sudo mount /dev/sdb1 /mnt’ The content is then found under /mnt, when done done ‘sudo unmount /mnt’ and power down the disk.

MAC-users with OSX can follow the same guide but the device names are different and found with ‘distil list’

The dd command has the same parameters ‘sudo dd if=/dev/rdiskNUM” of=file.dd bs=1m’

To see progress use ‘sudo pkill -INFO dd’

Ubuntu users just follow the Raspberry Pi instructions which is a Debian.

Do you need to make a clean bootable MS-DOS floppy disk, not that easy from Linux but if you have a copy of a bootable MS-DOS disk reuse the first sector:

A floppy contains:

A. A bootsector that with boot code that boots IO.SYS/MSDOS.SYS or similar.
B. Hidden IO.SYS, MSDOS.SYS files in root directory.
C. COMMAND.COM in root directory.

Linux does not support creating a bootable disk or floppy because it would violate the License. But one way to make MSDOS boot floppy in Linux, is to format an MSDOS floppy disk using a full format that zeroes each sector, then use REAL DOS to make a boot floppy with the /s switch. Then boot Linux in the computer, and make a disk image of the floppy with ‘dd if=/dev/fd0 of=bootable_msdos622.img’ This file can be reused to make more floppies later.

Do you need to partition a hardisk from Linux

Partition the new disk with ‘sudo parted’

(parted) mklabel msdos (Create the partition table not a partition)
(parted) mkpart primary FAT32 63s 9767519s (Create a FAT32 partition with size 4.7G, 63 is the start sector)

It is possible to set the boot flag, but it will not make the disk bootable in DOS since the boot code in the MBR and in he bootsector of the partition is missing. The MBR is stored together with the partition table in the first sector.

Set boot flag of partition

(parted) set 1 boot on (1 is the partiton number)
(parted) print (See the results)
(parted) quit


Tyvärr är denna artikel enbart tillgänglig på English.


Tyvärr är denna artikel enbart tillgänglig på English.

Zillertal Arena

Tyvärr är denna artikel enbart tillgänglig på English.


Tyvärr är denna artikel enbart tillgänglig på English.

Warning: Creating default object from empty value in /storage/content/58/133558/ on line 1089

Autumn hike

Tyvärr är denna artikel enbart tillgänglig på English.

(English) Springtime in Lund

Tyvärr är denna artikel enbart tillgänglig på English.

Nytt Album: Markhal

Markthal, Rotterdams new food market. Markthal, Rotterdam’s new food market.

© 2014 Stefan Lundberg

Markthal är Rotterdam’s nya marknadsplats för mat och dryck.

Mayrhofen – Zillertal Arena

Tyvärr är denna artikel enbart tillgänglig på English.


Tyvärr är denna artikel enbart tillgänglig på English.

Nytt Album: Vancouver’s Bridges

Downtown Vancouver with Lion Gate Bridge in the background Downtown Vancouver med Lion Gate Bridge i bakgrunden

© 2014 Stefan Lundberg

Foton av Vancouver’s broar: Burrand bridge, Canada place, Lions gate bridge, Iron workers memorial bridge, Capilano suspension bridge, Granville bridge, Cambie Street Bridge, Ambleside Railway Bridge

Nytt Album: Vancouver’s Clocks

Birks clock framför Sinclair clock tower i korsningen Hastings och Granville Street, Vancouver BC.

© 2014 Stefan Lundberg

Foton av fantastiska klockor i Vancouver, bland annat: Birks clock, Sinclair clock tower, The Gastown Steam Clock, Block clock, 9 O’clock gun.

Nytt Album: A-maze-ing Laughter

Bilder av A-maze-ing Laughter, Yue Minjun.

© 2014 Stefan Lundberg

Foton av A-maze-ing Laughter, en skulptur av Yue Minjun som finns permanent placerad i en park vi havet i Vancouver BC.