Page 1 of 1

accessing /home in rescue mode (b3)

Posted: 12 Jul 2013, 16:25
by zjuul
Hi there,

My b3 is not booting anymore. My guess is that /home is corrupt and needs a fsck.

I managed to boot from USB using the latest rescue system, but I cannot acces the /home partition.

Short question: I'd like to rescue the files on /home: how?
I've searched the internet and the forums.. couldn't find any information.

Is my disk corrupt? parted shows no file system type.. strange.

Code: Select all

# parted -l

Number  Start   End     Size    File system     Name  Flags
 1      17.4kB  10.7GB  10.7GB  ext3            root
 2      10.7GB  499GB   488GB                   home
 3      499GB   500GB   1074MB  linux-swap(v1)  swap

This is what I've tried:

This works: mount /dev/sda1 /mnt

This doesn't work: mount /dev/sda2 /mnt/home

mount: mounting /dev/sda2 on /mnt/home/ failed: Invalid argument

This doesn't work:

# mount /dev/mapper/bubba-storage /mnt/home
mount: mounting /dev/mapper/bubba-storage on /mnt/home failed: No such file or directory

Thanks for any clues.

Re: accessing /home in rescue mode (b3)

Posted: 14 Jul 2013, 12:50
by Cheeseboy
Hi zjuul,

There could be many reasons your B3 is no longer booting.
I would start by booting with the rescue stick, then mount /dev/sda1, just as you have done, then look at the log files.
If mounted as described in your post it would be things like:
/mnt/var/log/syslog
/mnt/var/log/fsck/checkfs.sh
/mnt/var/log/fsck/checkroot.sh

You will not be able to interact with your /home partition when booted from the rescue stick.
This is because /home is a LVM system, and the rescue stick is too basic to know about such things.
This is also the reason for your parted output.
If you REALLY need to have access to an unmounted /dev/mapper/bubba-storage, you have to do all of this:

*** DISCLAIMER ***
If you ruin your system by following any of these steps, I will not be held accountable.
If you are unsure, research all the steps yourself.
*********************

1. Create a directory like /temphome.

2. In this newly created directory, create subdirectories for:
Yourself
admin
web
--> Make sure the ownership and permissions are set correctly for each of these directories - they should look like the original home directories for these users!

3. Copy essential files to:
/temphome/Yourself
/temphome/admin
/temphome/web

The most essential files are in the admin home directory, and are hidden (file name starts with a dot), so a normal cp will probably not include them. Make sure they are there with ls -la.
The web home directory must also be there. Your own directory should probably include .ssh, .bashrc and other things to make things easier.

4. Edit /etc/fstab and comment out the line that mounts /home

5. (Optional) Disable any services that will write stuff to your home directory, so you don't have to sync it back to the real home directory afterwards. Example: postfix

6. Boot with the rescue stick

7. Mount /dev/sda1

8. In your <mountpoint>/home directory (which should be empty as it is only a mountpoint), create symlinks to <mountpoint>/temphome for:
Yourself
admin
web

9. Reboot

10. fsck on the now unmounted /dev/mapper/bubba-storage
(depending on size and options used, this could take days)

11. Reboot with the rescue stick

12. Undo all of the changes you have made

13. Bite your nails. Go through it again. Have you really restored everything?

14. Reboot

Best regards,

/Cheeseboy

Re: accessing /home in rescue mode (b3)

Posted: 14 Jul 2013, 14:36
by zjuul
Thanks.. this makes a lot of sense.

I'll follow your instructions.

Oh and after the fsck, I'll see if I can mount it cleanly and rescue any files on there before rebooting.

Thanks for the input! Will come back with the results.

Re: accessing /home in rescue mode (b3)

Posted: 14 Jul 2013, 16:03
by zjuul
Well.. that was quick. Seems my system is more broken than I thought.

E.g. /var was missing.

Anyway.. I'm taking my loss.. reinstalling now.

Re: accessing /home in rescue mode (b3)

Posted: 16 Jul 2013, 04:40
by zjuul
aaaaand it's gone.

Reinstall didn't work. Luckily it's still under warranty, and support @ excito is helping me out.