dd'ing a modified partition table to my /dev/ad0
run10kswim_at_directvinternet.com
Date: 12/31/04
- Next message: run10kswim_at_directvinternet.com: "Re: bsdlabel (can't create ad0s9[a-f])"
- Previous message: jpd: "Re: mount_nfs -T -i --> fstab?"
- Next in thread: David Lord: "Re: dd'ing a modified partition table to my /dev/ad0"
- Reply: David Lord: "Re: dd'ing a modified partition table to my /dev/ad0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Dec 2004 15:10:54 -0800
i started a thread on 27-dec re: "creating FB partitions within
ad0s9a/b/d/e/f/etc." please see:
Per Hedeland suggested that i try changing the disk type value within
the extended dos partition's partition table (the table specific to the
logical drive i want to partition) to A5 (freebsd). sounds like a
sensible (albeit nerve wracking) idea to me.
now PerH suggested that i employ a tool such as linux-fdisk (ports) to
do the dirty work. whenever i start linux-fdisk it warns me that i
"don't have write permission". that's fine. i figured i could just
use 'dd' to do the same thing. unfortunately, when i tried to do the dd
re-write i got an error which stated:
dd: /dev/ad0: Operation not permitted.
i'm by no means a 'dd' expert. i just assume that so long as i don't
give it a totally bogus set of command options that it'll just write
away, pleased as punch (hence the nerve wracking). may i use 'dd' to
write a sector to an system-related section of an exteded DOS partition
disk? the existing partiton identifier is 'b' (FAT32).
if you need more background info, let me briefly describe my
configuration & procedure.
# fdisk /dev/ad0
PARTITION INFO
partition id | starting sect | ending sect | id | Syst |
-------------------------------------------------------------------------------------------------------------
/dev/ad0s1 | 63 | 6763364 | a5 | freebsd |
....
/dev/ad0s9 | 71280468 | 80276804 | b | FAT32 |
from poking around with 'dd' i've noticed that the Extended Boot Record
(including the partition table stuff) actually begins 63 sectors AHEAD
of fdisk's diagnosed "starting sector" - at sector #71280405 (what
actually begins at ##68 must be the data). anyway, i recovered the
target sector as follows:
# dd if=/dev/ad0 skip=71280405 of=mypartitiondata
then i edited the binary file <mypartitiondata> with 'beav' (ports) to
change a single lousy value (at offset 1C2 Hex) from '0B' (FAT32) to
'A5' (FreeBSD). no problem. but then, when i tried to modify my disk:
# dd if=mypartitiondata of=/dev/ad0 oseek=71280405 conv=notrunc
i received that nasty "Operation not permitted" error.
am i just misusing 'dd'?
should i consider myself lucky that i didn't destroy my entire disk?
should i go back to trying to get 'linux-fdisk' to do the dirty work?
thanks and happy new year to all.
- kenneth harwood
- Next message: run10kswim_at_directvinternet.com: "Re: bsdlabel (can't create ad0s9[a-f])"
- Previous message: jpd: "Re: mount_nfs -T -i --> fstab?"
- Next in thread: David Lord: "Re: dd'ing a modified partition table to my /dev/ad0"
- Reply: David Lord: "Re: dd'ing a modified partition table to my /dev/ad0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|