Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition corrupted, superblock invalid ! #29

Open
tchepperz opened this issue Nov 29, 2016 · 4 comments
Open

Partition corrupted, superblock invalid ! #29

tchepperz opened this issue Nov 29, 2016 · 4 comments

Comments

@tchepperz
Copy link

Hi,
I'm trying to flash my BBB (rev C) with the lastest debian image via USB.

This is what I got when the flashing script finished

` Flashing now, be patient. It will take ~5 minutes!

0+300408 records in
0+300408 records out
3565158400 bytes (3.6 GB, 3.3 GiB) copied, 453.595 s, 7.9 MB/s

Resizing partitons now, just as a saefty measure if you flash 2GB image on 4GB board!
2: unknown command
e2fsck 1.43.1 (08-Jun-2016)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdc2

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193
or
e2fsck -b 32768

resize2fs 1.43.1 (08-Jun-2016)
resize2fs: Bad magic number in super-block while trying to open /dev/sdc2
Couldn't find valid filesystem superblock.

Please remove power from your board and plug it again. You will boot in the new OS!`

I tried e2fsck command below, same error message (superblock corrupt)

I did
`sudo mke2fs -n /dev/sdc2

mke2fs 1.43.1 (08-Jun-2016)
Creating filesystem with 933632 4k blocks and 233856 inodes
Filesystem UUID: 09628511-1ec4-4826-b819-1c09b67087ad
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736`

And then
e2fsck -b blocknumber /dev/sdc2

For each block number below and I got the same error except for block 884736, but it finished with

`Inode 64425 block 33261 conflicts with critical metadata, skipping block checks.
Illegal block #568330252 (381881341) in inode 64425. CLEARED.
Error storing directory block information (inode=64425, block=0, num=471243006): Memory allocation failed

/dev/sdc2: ***** FILE SYSTEM WAS MODIFIED *****
e2fsck: aborted

/dev/sdc2: ***** FILE SYSTEM WAS MODIFIED *****
`
Nedless to say that my BBB is not booting..
I tried flashing 3 times and it's ever the same, flashing seems to corrupt my emmc partition.
How could I fix this? If anyone has an idea..
Thanks

@ungureanuvladvictor
Copy link
Owner

Hey @tchepperz, I do not have to do any active development on this project. Can you ask in #beagle IRC channel for help? I think the beagle people can use now u-boot to achieve same thing my project does.

@rubienr
Copy link
Contributor

rubienr commented May 27, 2017

Hi @tchepperz,
I run into same issue using a bone-debian-8.8-machinekit-armhf-2017-05-21-4gb.img.xz image, which does not provide a 2nd partition in the image. Thus, when the script is deleting the 2nd partition it fails. My proposal for such case is just skipping resize implementation which are the following lines in bin/flash_script.sh:

142 echo
143 echo "Resizing partitons now, just as a saefty measure if you flash 2GB image on 4GB board!"
144 echo -e "d\n2\nn\np\n2\n\n\nw" | sudo fdisk /dev/$bbb > /dev/null
145 fi
146 sudo e2fsck -f /dev/${bbb}2
147 sudo resize2fs /dev/${bbb}2

If you manually want to resize, use gparted for that task.

br, rr

@ndorf
Copy link

ndorf commented Oct 18, 2017

This change seems to be all that's needed, to get BBBlfs working with the latest (9.1) debian images.

@hellraiserinchief
Copy link

This change seems to be all that's needed, to get BBBlfs working with the latest (9.1) debian images.

You are a life saver. Works on latest 10.3 debian too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants