Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Seven11
Member
Posts: 25 Joined: Mon Oct 30, 2006 12:48 pm
Post
by Seven11 » Mon Oct 30, 2006 12:58 pm
I have just switched from Windows XP to Mandriva Linux on my laptop and are now trying to get my old kernel to work.
I'm using dd, losetup and mkdosfs (just as the wiki explains
here ).
like this:
dd if=/dev/zero of=floppy.img bs=512 count=2880
losetup /dev/loop0 floppy.img
mkdosfs /dev/loop0 -F 12 -c -v
But my mkdosfs (0.4) replies:
mkdosfs: Unable to get drive geometry for '/dev/loop0'
Anybody who knows what might be wrong?
[/quote]
Combuster
Member
Posts: 9301 Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:
Post
by Combuster » Mon Oct 30, 2006 2:37 pm
Apparently it cant get the CHS values for the floppy (or guess them) - you'll probably have to supply them manually (2 heads, 80 cylinders, 18 sectors IIRC)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[
My OS ] [
VDisk/SFS ]
Seven11
Member
Posts: 25 Joined: Mon Oct 30, 2006 12:48 pm
Post
by Seven11 » Mon Oct 30, 2006 4:31 pm
yes I knew that... but there's no way to tell mkdosfs or losetup the CHS geometry.
Does anybody know of another way to build a FAT disk (without using the floppy) under Linux?
Brynet-Inc
Member
Posts: 2426 Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:
Post
by Brynet-Inc » Mon Oct 30, 2006 5:04 pm
Ahh, Now I know why I love OpenBSD..
Code: Select all
[brynet@obox]~: $ dd if=/dev/zero of=test.img bs=512 count=2880
[brynet@obox]~: $ sudo vnconfig svnd0 /home/brynet/test.img
[brynet@obox]~: $ sudo newfs_msdos -F 12 /dev/svnd0c
[brynet@obox]~: $ sudo mount -t msdos /dev/svnd0c /floppy
[brynet@obox]~: $ sudo umount /floppy
[brynet@obox]~: $ sudo vnconfig -u svnd0
[brynet@obox]~: $ tar zcvf fat-img.tar.gz test.img
Sorry for gloating..
Also a neat feature in OpenBSD's newfs_msdos command is the -B flag.. (
Get bootstrap from file )
Attachments
fat-img.tar.gz
(1.7 KiB) Downloaded 111 times
Twitter: @canadianbryan . Award by smcerm, I stole it. Original was larger.
Seven11
Member
Posts: 25 Joined: Mon Oct 30, 2006 12:48 pm
Post
by Seven11 » Tue Oct 31, 2006 6:21 am
alright I solved it using wine to emulate my old DOS FAT image file creator
Brynet-Inc
Member
Posts: 2426 Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:
Post
by Brynet-Inc » Tue Oct 31, 2006 6:32 am
Seven11 wrote: alright I solved it using wine to emulate my old DOS FAT image file creator
Shame on you..
Twitter: @canadianbryan . Award by smcerm, I stole it. Original was larger.