You are not logged in.
I would like to begin by saying, I f***ed up big time.
When trying to reboot my machine having hibernated it the night before, I found that the computer would only boot into recovery mode and didn't respond to my keyboard. After trying again, and the fallback I put the Arch install disk in to try to figure out the problem. The first thing I found was the /boot partition couldn't mount due to a filesystem problem. I decided that rather than try and fix it, I'd create a new one. I originally used JFS for god knows what reason but this time I tried to put ext2 on it (which is I use for all my other Arch installs). Afterwhich, it seemed to have some kind of problem with both of the filesystems. I learnt from another install that a good way to deal with a filesystem that refuses to die is to use:
dd if=/dev/urandom of=/dev/sdaX bs=1M
and create a new partition in it's place. But I must have overlooked something because now it says that sda4 (the /boot partition I was trying to destroy) is longer than the hard drive.
I'm fairly certain that my data is still there because it says dd only wrote about 176kB. I think I should be able to delete the partition and everything should work, but I may be oversimplifying it.
If anyone has any suggestions or idea the help is appreciated. Also I am, at this moment, creating an image of my drive, just in case.
Right now I'm thinking of print /dev/zero to sda4 for 176kB and see if that fixes it.
Last edited by Dornith (2013-11-23 21:36:48)
Offline
Okay, first, is that actually the command that you used? If so, it shouldn't have done anything since /dev/sdX almost certainly isn't a valid device (nor the one you talk about). Second, that command would zero the whole drive, so if you ran that command without specifying a specific partition, the drive is probably zero'd.
All the best,
-HG
Offline
Sorry it was urandom, not zero. I fixed it in the orignal post.
Also, that this not the actual command I typed into this computer, it was just a format for a command I had learnt to use in another instance. The actual command I typed onto my now non-functional computer was:
dd if=/dev/urandom of=/dev/sda4
Last edited by Dornith (2013-11-23 21:39:42)
Offline
Next time, look into wipefs.
Offline
Use Testdisk to resurrect that partition. It is the fastest and simplest way I'm aware of resurrecting dead / old partitions. It should be on the wiki about how Testdisk is used. Your partition may still be damaged but at least you can access it after Testdisk is done and then run the fsck utility (JFS does have one, right?) on that partition. From there I'm pretty sure you can figure out what else you need to do.
Last edited by MoonSwan (2013-11-23 23:49:03)
Offline
What kind of partition table does it have? GPT disks have a back up partition table which tools like gdisk can use to restore a damaged primary partition table.
Please post the output of gdisk -l /dev/sdX (for GPT) or fdisk -l /dev/sdX (for MBR).
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline