I did an update yesterday and didn't reboot my laptop until I had a power failure. Upon rebooting I find that I have no hard drive (or so it claims). I've tried booting into an arch live disk and I end up with rootfs. I don't know what to do here really. I was thinking of mounting the disks, but didn't know where to. I have sda,1,2,3,4 and sdb,1. Executing du -h /dev/sda*
shows a zero at the beginning of each line. But then again df -h
shows me as using 0% of the usb. Still, even if I got them mounted, I'm not sure what I would do, because how would I reinstall grub or gummiboot? (If that is what the problem is. I think it is because I saw a grub update).
The error I get when booting into the live usb is
:: running early hook [udev]
:: running hook [udev]
:: Triggering uevents...
:: running hook [memdisk]
:: running hook [archiso]
:: running hook [archiso_loop_mnt]
:: running hook [archiso_pxe_common]
:: running hook [archiso_pxe_ndb]
:: running hook [archiso_pxe_http]
:: running hook [archiso_pxe_nfs]
:: Mounting '/dev/disk/by-label/ARCH_201409' to '/run/archiso/bootmnt'
Waiting 30 seconds for device /dev/disk/by-label/ARCH_201409 ...
[ 9.375197] sd 6:0:0:0: [sdb] No Caching mode page found
[ 9.375197] sd 6:0:0:0: [sdb] Assuming drive cache: write through
ERROR: '/dev/disk/by-label/ARCH_201409' device did not show up after 30 seconds...
Falling back to interactive prompt
You can try to fix the problem manually, log out when you are finished
sh: can't access tty; job control turned off
[rootfs /]#
I got it chrooted and now I am located at [root@(none)]#
SOLUTION
Unetbootin seems to have problems creating Arch cd's. This took two usb's. Fallback to rootfs on sdb and plugged in usb2 for sdc. rootfs didn't have fdisk or anything so I mounted sda1,2,4 on /mnt, /mnt/boot, /mnt/home respectively. I then chrooted into /mnt ([root@(none) ]#
).
From there I could reformat sdc (after copying an archiso over to /home/name/wherever). Then dd bs=4M if=/path/to/arch.iso of=/dev/sdc && sync
and then rebooted.
This gave me a normal arch boot, where I had arch-chroot and I could properly run systemctl start dhcpcd.service
for internet access (ethernet). I tried to reinstall grub, but it didn't work.
I went with gummiboot (following beginner's guide). Presto, system works now.
Best Answer
After some chat, I'm posting an answer summing up a few interesting leads to follow while facing such problems.
Booting safely on a USB image
As you can see here, it seems like your system went into some trouble when trying to boot from the USB drive:
While your BIOS successfully detects a bootable medium and initiates a boot sequence, Arch does not boot correctly due to some kind of disk error. As you said in chat, your formatted and sent your images on your key quite a few times, which could lead to broken images or partition tables. When sending a bootable ISO image onto a USB drive, it's usually a good idea to make sure the drive is really clean before proceeding:
Use
d
repeatedly until there is no partition left. Then, recreate a clean partition taking up the whole device:Then will follow some size-related options, just choose the default every time. When you're done, write the changes to disk using
w
. Now that the partition table is a little cleaner, you may format...... and send your Arch ISO onto the drive:
Note: it is very important that both the Arch ISO and the hard system share the same architecture!
At this point, you may reboot your machine and get to the live system without too much trouble. Just make sure your USB drive comes first in your BIOS boot sequence.
Chrooting into the old/broken system
Now this is a little trickier, I'll mostly reuse the contents of the Arch Wiki. You have two options here:
In the first case, all you have to do is mount your "homemade" partitions: those your created when you installed the system:
Once you're done, just use
arch-chroot
to get inside:Now, if you want to chroot everything yourself, you're going to have a little more work to do. First, mount the previous systems, then add:
You might also want a working DNS resolver (yet it's unlikely to have been damaged):
Finally, get inside:
Investigating
Basically, your system just went out of power. As you said, there was no significant task running (at least, no upgrade), so the loss must have been limited. First things first, check your logs. Have a look in
/var/log
and usejournalctl
to find information about what happened before the shutdown.Reinstalling GRUB
In chat, you said that your system was no longer available in the boot menu, probably something related to the latest update you made. Let's reinstall it: