The Navigatrix has been updated. The new website can be found at navigatrix.net.




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to write Raw Image to Floppy dd if=disk1.img of=/dev/fd0

Joined: 09 Apr 2014, 15:51
Posts: 45
I'm trying to install a distro called BasicLinux onto floppies for a really old pc to get her running. Having trouble following the directions to write the raw image to the floppy using this dd command:
dd if=disk1.img of=/dev/fd0
from the directions, however when I run this in Terminal I get this: gun@gun-CF-52GUNBRAM:~$ dd if=disk1.img of=/dev/fd0
dd: failed to open ‘disk1.img’: No such file or directory
The disk image is in a folder on the desktop, called
"DISK1.IMG"
I looked up one article which said to use dosfstools, which is on Nx, but that does not seem to help. Here is that article:
http://www.legroom.net/2010/06/05/creat ... thin-linux
The article ends with an automatic script, which makes no sense to me:
"To make things even easier, the following script automates the entire process; just pass it the directory containing all of the files you want copied to the floppy disk and it'll do the rest."
#!/bin/bash
# Setup environment
FORMAT=$(which mkfs.vfat 2>/dev/null)
MOUNT=$(which mount 2>/dev/null)
TMP='/tmp'
shopt -s dotglob

# Verify binaries exist
MISSING=''
[ ! -e "$FORMAT" ] && MISSING+='mkfs.vfat, '
[ ! -e "$MOUNT" ] && MISSING+='mount, '
if [ -n "$MISSING" ]; then
echo "Error: cannot find the following binaries: ${MISSING%%, }"
exit
fi

# Verify arguments
if [ ! -d "$1" ]; then
echo "Error: You must specify a directory containing the floppy disk files"
exit
else
DISK=$(basename "${1}")
IMG="${TMP}/${DISK}.img"
TEMP="${TMP}/temp_${DISK}"
fi

# Load loopback module if necessary
if [ ! -e /dev/loop0 ]; then
sudo modprobe loop
sleep 1
fi

# Create disk image
${FORMAT} -C "${IMG}" 1440
mkdir "${TEMP}"
sudo $MOUNT -o loop,uid=$UID -t vfat "${IMG}" "${TEMP}"
cp -f "${DISK}"/* "${TEMP}"/
sudo umount "${TEMP}"
rmdir "${TEMP}"
mv "${IMG}" .

Any help greatly appreciated.
Cleve
---------------------------


Top
   
 
 Post subject: Re: How to write Raw Image to Floppy dd if=disk1.img of=/dev

Joined: 04 Nov 2010, 20:51
Posts: 1062
Quote:
I get this: gun@gun-CF-52GUNBRAM:~$ dd if=disk1.img of=/dev/fd0
dd: failed to open ‘disk1.img’: No such file or directory
The disk image is in a folder on the desktop, called
"DISK1.IMG"


This is not really a Navigatrix question, but....

If the file is in a folder on your desktop the command should be:

sudo dd if=~/Desktop/folder_you_put_it_in/disk1.img of=/dev/fd0

(You can groan now.)


Top
   
 
 Post subject: Re: How to write Raw Image to Floppy dd if=disk1.img of=/dev

Joined: 09 Apr 2014, 15:51
Posts: 45
Moe, thank you very much. On my Toughbook with exclusive Navigatrix operating system. Your insight is just what I needed!
Thank you again for helping out so many.
I only wish Nx would load on the project I'm working on. It's a Pentium 233 MHz 128 mb RAM and a 4 GB hard drive ;)


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Search for:

Credits © 2010 - 2024