LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Laptop died, moved HDD to external enclosure. Can't boot. (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/laptop-died-moved-hdd-to-external-enclosure-cant-boot-783604/)

uncertain 01-20-2010 05:56 PM

Laptop died, moved HDD to external enclosure. Can't boot.
 
I have an Acer Travelmate 2480 that died on me. I pulled the HDD out and moved it to an external USB enclosure.

If I boot into the normal installs on the host laptop (either Win7 or Karmic) I can access the drive and read/write files as though it were just an external storage device with multiple partitions. If I try to boot from the drive (either WinXP or Mint7), however, it goes so far and throws an error.

For XP it's just a BSOD and a reboot. Under Mint7, I get errors about it trying to mount various directories and then it just faults out to a command line.

Is there a way to make Mint7 boot on this external disk, or should I just pull all the personal data off it and reformat/reinstall everything? I figure the WinXP install on it is a lost cause, but I'm hoping to get the Mint install up and running...

jschiwal 01-20-2010 06:04 PM

Determine which filesystem can't mount. If it isn't used for a system directory, then commenting out the entry in /etc/fstab will allow you to boot up. When it faults out to a command line, you are probably running in the initrd environment. From there you can enter "mount" to see which filesystems are mounted and which aren't.

If you are lucky, the problem is a filesystem error on the Windows' partition. Comment out the lines in /etc/fstab for the Windows partitions. You may be able to boot Mint, and then copy off the files in the Windows partition.

uncertain 01-21-2010 04:34 AM

Quote:

Originally Posted by jschiwal (Post 3834194)
Determine which filesystem can't mount. If it isn't used for a system directory, then commenting out the entry in /etc/fstab will allow you to boot up. When it faults out to a command line, you are probably running in the initrd environment. From there you can enter "mount" to see which filesystems are mounted and which aren't.

If you are lucky, the problem is a filesystem error on the Windows' partition. Comment out the lines in /etc/fstab for the Windows partitions. You may be able to boot Mint, and then copy off the files in the Windows partition.

I tried looking in fstab like you suggested, but I don't think removing these entries would work, since as you say, they're for system directories.

I did manage to write down the error(s) that it gives me before dumping me into the initrd CLI:
Quote:

mounting /dev on /root/dev failed: no such directory exists
mounting /sys on /root/sys failed: no such directory exists
mounting /proc on /root/proc failed: no such directory exists
target filesystem doesn't have /sbin/init
no init found. try passing init= bootarg
Here's the fstab file from the drive:
Code:

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    defaults        0      0
# / was on /dev/sda5 during installation
UUID=75557f11-0cb9-4516-b42f-62d6a5392e12 /              ext4    relatime,errors=remount-ro 0      1
# /home was on /dev/sda7 during installation
UUID=a0f432a5-40b6-488d-88b3-4b7134a54d9c /home          ext4    relatime        0      2
# swap was on /dev/sda6 during installation
UUID=e1c5c25c-7c4d-4569-8886-3949ba114d79 none            swap    sw              0      0

I realize I'm trying to boot one computer with a hard drive that came out of another. If I select that as my boot device from BIOS, shouldn't that HDD become the default filesystem, and mount/run accordingly? Is it possible that the UUIDs have changed? I don't think it would show up as /dev/sdaX any more, either, since it's running out of a USB enclosure and not the internal SATA bus.

(EDIT: Checking the mount command on my regular install shows /dev/sdbX as the devices on that enclosure. What should I change? How should I update grub on the external drive? The initrd environment is very limited; I don't even have nano or vi there!)

uncertain 01-21-2010 04:04 PM

I finally got it to work. And it turns out, the key was more or less in fstab as you previously suggested.

Searching on Google led me down a number of different roads, all of them wrong. First I was trying to chroot into the disk and re-installing GRUB, reinstalling the ubuntu-minimal package, along with a few other things. That was a total waste of time (though I never used chroot before and I find it to be quite a handy utility).

It was as simple as changing the device labels in /boot/grub/menu.lst from (hd0,X) to (hd1,X) and changing the entries in fstab from UUIDs to /dev/sdbX designations, with separate entries for root, /home, and the swap partition that's there.

The XP install on the drive is lost and won't boot at all, but it is still accessible from inside any of the OSs I have installed on this computer or on that drive. Since the XP install there is lost and the Mint install is outdated, I'll probably still just remove all the personal data on it and re-install everything.

Thanks for your help.


All times are GMT -5. The time now is 05:48 PM.