Is there a command which is working like on NetBSD to restore previously saved disklabel?
I tried both applying disklabel file from commands
or
None of two files can be restored.
Thank you so much.
Code:
freebsd# gpart show
=> 63 20971457 ad0s1 MBR (10G)
63 10485153 1 freebsd [active] (5G)
10485216 10486304 - free - (5.0G)
Code:
# save
disklabel ad0s1 >/tmp/file
# restore
disklabel -R ad0s1 /tmp/file
I tried both applying disklabel file from commands
Code:
freebsd# disklabel -r ad0s1
# /dev/ad0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 10485153 0 4.2BSD 0 0 0
c: 10485153 0 unused 0 0 # "raw" part, don't edit
disklabel: partition c doesn't cover the whole unit!
disklabel: An incorrect partition c may cause problems for standard system utilities
or
Code:
freebsd# disklabel -A ad0s1
# /dev/ad0s1:
type: ESDI
disk: ad0s1
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 10402
sectors/unit: 10485760
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 10485153 0 4.2BSD 0 0 0
c: 10485153 0 unused 0 0 # "raw" part, don't edit
disklabel: partition c doesn't cover the whole unit!
disklabel: An incorrect partition c may cause problems for standard system utilities
None of two files can be restored.
Thank you so much.