Re: dd'ing a modified partition table to my /dev/ad0
From: David Lord (snews_at_lordynet.demon.co.uk)
Date: 12/31/04
- Next message: Torfinn Ingolfsen: "USB Data Link cable support in FreeBSD?"
- Previous message: Per Hedeland: "Re: mount_nfs -T -i --> fstab?"
- In reply to: run10kswim_at_directvinternet.com: "dd'ing a modified partition table to my /dev/ad0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Dec 2004 01:05:04 +0000 (GMT)
On 30 Dec, in article
<1104448254.893164.284600@z14g2000cwz.googlegroups.com>
run10kswim@directvinternet.com wrote:
> /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.
I'd boot from a Linux rescue cd and change the partition type from
that. It's also possible to put in place a FreeBSD disklabel from
Linux fdisk but when I've tried it pre install of FreeBSD, I've
never found it to be accepted.
Although I don't know if this is possible, it could be worth trying
to make the existing FreeBSD slice overlap the extended partition
and then add the extra space using disklabel.
Third possibility, which I'm sure will work if done correctly is to
copy off the data from all the separate partitions, recreate the
partitions with the extra space added to the existing FreeBSD slice
and new FreeBSD disklabel as required then restore the data. The
relocated bootable partitions probably require reinitialising.
Depending on the existing logical partitions it might evenn be
possible to do this on or two partitions at a time as they are moved
towards end of the disk.
David
-- The Reply-To: is valid for at least 30 days after posting date David Lord - david@lordynet.demon.co.uk
- Next message: Torfinn Ingolfsen: "USB Data Link cable support in FreeBSD?"
- Previous message: Per Hedeland: "Re: mount_nfs -T -i --> fstab?"
- In reply to: run10kswim_at_directvinternet.com: "dd'ing a modified partition table to my /dev/ad0"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|