Hi,
I'm trying to find/map an alternate super block in Single User Mode to fix a /var partition /dev/ad0s1d.
Some context to the error...
This is on a new drive that has successfully had an image restored to it. G4U could not clone the original drive due to a 'hidden' error that fsck couldn't fix.
Yet the original drive boots and runs with no errors, and fsck states all partitions including /ad0s1d are clean.
Clonezilla did clone the original drive and restore the image to the new drive, but it also cloned the 'hidden' error that prevented G4U imaging the original drive.
And it turns out that this error on the new drive is in the same partition as on the original drive, and now the error isn't 'hidden' - it's a super block error.
If that made sense (lol)... then to get the new drive booting normally, all I have to do is find/map an alternate super block in Single User Mode to fix the /var partition /dev/ad0s1d.
When booting up the new drive all partitions other than /dev/ad0s1d (/var) report as clean.
Then the following error is reported:
and the system drops into Single User Mode.
When trying to fix this with:
the following is printed:
This strikes me as odd as the partition is UFS not UFS2, which should use 32.
Finding possible alternate super blocks with the command:
(NOTE to noobs: make sure you use -N NOT -n to avoid creating a new file system.)
gives the numbers:
Attempting to use an alternate superblock with the command:
prints for each superblock number above:
except for 3010976 and 3387328, which return:
To correct this, I've tried using:
which prints the following:
and re-running
Getting /var working and this backup drive booting properly is very important to my tiny startup as this is the only backup of the original drive.
I can't put the server with the original drive online to launch (and pay bills/make profit/donate to FreeBSD) until I know it has been cloned and restored successfully.
I'm so close to getting a backup working - all help is appreciated!!!
My two questions are:
1. Can anyone please help me fix /dev/ad0s1d by finding a superblock that works without the error:
2. Because this error is from an image of a drive that is likely to have the same error on the same partition, can I use the same method to fix the same partition on the original drive?
Thanks
I'm trying to find/map an alternate super block in Single User Mode to fix a /var partition /dev/ad0s1d.
Some context to the error...
This is on a new drive that has successfully had an image restored to it. G4U could not clone the original drive due to a 'hidden' error that fsck couldn't fix.
Yet the original drive boots and runs with no errors, and fsck states all partitions including /ad0s1d are clean.
Clonezilla did clone the original drive and restore the image to the new drive, but it also cloned the 'hidden' error that prevented G4U imaging the original drive.
And it turns out that this error on the new drive is in the same partition as on the original drive, and now the error isn't 'hidden' - it's a super block error.
If that made sense (lol)... then to get the new drive booting normally, all I have to do is find/map an alternate super block in Single User Mode to fix the /var partition /dev/ad0s1d.
When booting up the new drive all partitions other than /dev/ad0s1d (/var) report as clean.
Then the following error is reported:
Code:
/dev/ad0s1d: bad super block: values in super block disagree with those in first alternate.
The following file system had an unexpected inconsistency: ufs: /dev/ad0s1d (/var)
When trying to fix this with:
fsck /dev/ad0s1d
the following is printed:
Code:
Bad super block: values in super block disagree with those in first alternate
Look for alternate superblocks? [y/n] y
32 is not a file system superblock
Search for alternate super-block failed. You must use the -b option to specify the location
of an alternate super-block to supply needed information; see fsck(8).
This strikes me as odd as the partition is UFS not UFS2, which should use 32.
Finding possible alternate super blocks with the command:
newfs -N /dev/ad0s1d
(NOTE to noobs: make sure you use -N NOT -n to avoid creating a new file system.)
gives the numbers:
Code:
160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328
Attempting to use an alternate superblock with the command:
fsck_ffs -b <alternate_superblock_no. eg 160> /dev/ad0s1d
prints for each superblock number above:
Code:
Alternate super block location <no. eg 160>
** /dev/ad0s1d
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
fsck_ffs: cannot alloc 2155905152 bytes for inoinfo
except for 3010976 and 3387328, which return:
Code:
<no.> is not a file system superblock
To correct this, I've tried using:
dd if=/dev/ad0s1d skip=32 of=/dev/ad0s1d seek=16 bs=512 count=16
which prints the following:
Code:
16+0 records in
16+0 records out
8192 bytes transferred in 0.010779 secs (760003 bytes/sec)
and re-running
fsck_ffs -b <alternate_superblock_no.> /dev/ad0s1d
I still get the same inoinfo error.Getting /var working and this backup drive booting properly is very important to my tiny startup as this is the only backup of the original drive.
I can't put the server with the original drive online to launch (and pay bills/make profit/donate to FreeBSD) until I know it has been cloned and restored successfully.
I'm so close to getting a backup working - all help is appreciated!!!
My two questions are:
1. Can anyone please help me fix /dev/ad0s1d by finding a superblock that works without the error:
Code:
fsck_ffs: cannot alloc 2155905152 bytes for inoinfo
2. Because this error is from an image of a drive that is likely to have the same error on the same partition, can I use the same method to fix the same partition on the original drive?
Thanks