NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
I have botched my disklabel. Can I recover my data?
Memo to myself: backup!
In a failed attempt at editing the disklabel, I eventually deleted it
and obviously I could not boot again. I did not save the disklabel
geometry before hand (Yes, I know...), so I booted from the install
disk and tried to recreate the information by hand. So I did:
# disklabel -i ld0
I selected 10GB for the whole disk and 9.5 GB for the NetBSD
partition, because I had a 500MB swap partition, saved, crossed
fingers, rebooted and:
### START ####
Tue Mar 15 10:16:49 GMT 2022
Starting root file system check:
Can't open /dev/rld0a: Device not configured
CAN'T CHECK FILE SYSTEM.
/dev/rld0a: UNEXPECTED INCONSISTENCY; RUN fsck_ffs MANUALLY.
Automatic file system check failed; help!
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
[1] Terminated rc_real_work "${@}" 2>&1 |
Done(1) rc_postprocess
Enter pathname of shell or RETURN for /bin/sh:
#/bin/ksh
# fdisk ld0
Disk: /dev/rld0
NetBSD disklabel disk geometry:
cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 20971520, bytes/sector: 512
BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 20971520
Partitions aligned to 16065 sector boundaries, offset 63
Partition table:
0: NetBSD (sysid 169)
bootmenu: NetBSD
start 64, size 19456724 (9500 MB, Cyls 0/1/2-1211/32/57), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
Drive serial number: 0 (0x00000000)
# disklabel ld0
# /dev/rld0:
type: unknown
disk: ld0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 20971520
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
5 partitions:
# size offset fstype [fsize bsize cpg/sgs]
c: 19456724 64 unused 0 0 # (Cyl. 0*- 19302*)
d: 20971520 0 unused 0 0 # (Cyl. 0 - 20805*)
e: 18432224 64 4.2BSD 0 0 0 # (Cyl. 0*- 18285)
### END ###
So, at this point I wonder if there is anything I can do. I haven't
played with NetBSD for a while and disklabel has always been a problem
for me.
I wonder if I can at the very least recover some data of the old disk
and dump it somewhere else. It's a qemu disk, so it's no big deal
creating one more. The problem is that I had a lot of data.
This is what I see from the recovery shell:
Any help will be appreciated.
--
Ottavio Caruso
Home |
Main Index |
Thread Index |
Old Index