/home Partition Won't Mount During Startup

This is strange. I moved OS 11.1 from an old 150 GB PATA drive over to a 500 GB SATA using Parted Magic. The old and new partitions were


OLD:
/dev/sda1  - 19.99 GB, mounted as / (root partition)
/dev/sda2  - 97.82 GB, mounted as /home
/dev/sdb1  - 29.52 GB, Windows XP
NEW:
/dev/sda1  - 29.30 GB, mounted as /
/dev/sda2  -292.97 GB, mounted as /home
/dev/sda3  - 45.82 GB, Windows XP

I used the “Clonezilla” tool on the Parted Magic live CD to move and resize the partitions. To my delight, everything appeared to transfer just fine. I can boot into OpenSUSE 11.1 (though not into Windows, but that’s not really important; I’ll figure that out later), but my /home partition won’t mount. I’m set to autologin, and I get the expected error: “can’t access /home/stephen” (or something like that).

Here’s the weird thing. I can ALT-F3, get a terminal and manually “mount /dev/sda2 /home”, go back to ATL-F7 and log right in, so I know the disk is fine. (I’ve already 'fsck’d everything, by the way, and they’re clean.) I’ve used Yast’s partitioner about a dozen times, trying “device by ID” and other settings. I always get the same thing when I reboot.

Here’s what’s REALLY weird. On this last reboot, when it refused to log into /home, I ALT-F3’d, logged in as root, did a “cat” on “/etc/fstab” and entered the device-by-id line exactly as I saw it there … … and it mounted the /home directory just fine! ALT-F7, logged into KDE. I’m typing this in KDE now. Works fine.

This isn’t a huge problem … I so rarely need to reboot this machine that I can manually mount the /home partition, if need be, but (obviously) I’d like it to be mounted automatically during the boot.

Here’s my /etc/fstab:


/dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part1 /			  ext3       acl,user_xattr        1 1
/dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part2 /home		  ext3       acl,user_xattr        user,acl,1 2
/dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part3 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

(Sorry for all the space in there; Yast’s partitioning tool obviously likes a lot of whitespace!)

I don’t see anything obviously wrong here. The fact that I can take that second line and do a manual “mount” shows me that the device ID is at least correct. Any ideas?

Thanks in advance.

EDIT: Just to be clear, here’s what I entered in virtual terminal 3 as root to get my home partition to mount:


mount /dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part2 /home

… and it worked fine. Exact same line.

Have you tried changing the mount entry in fstab to

/dev/sda2
rather than the disk id

Indeed, … further to caf4926’s question/recommendation, is “ata-Hitachi_HDP725050GLA360_GE” your new hard drive? If not, then you should not explicitly have it listed in any place in fstab.

To answer both of you (and thanks, by the way): first, yes, that is my new hard drive. The ID is correct. But think about this: boot-up mounts the root (“/”) partition just fine; all drivers are loaded, everything is happy – I just have no /home, so I can’t log all the way in. And as I said above, I can take that exact same device ID from the fstab file, manually type it into a “mount” command, and the /home directory mounts just fine. I can log right into KDE.

To answer caf’s question: yes, I’ve tried “by ID” and by device name (i.e., /dev/sda2) manually in fstab. I’ve also tried (as mentioned above) clicking every thing that I could in the “fstab options” when using Yast’s partitioning tool (both GUI and text versions, though that shouldn’t make a difference).

Someone who’s a mount guru might scroll the code boxes on my dump of fstab above to see if all the little varmints and numbers out to the right look OK. I’m not familiar with all of the options that you can add to a line in fstab. Maybe that’s it.

Oh, and just to complete the fun … I didn’t see anything obvious is the syslog. Just passes right over mount /home.

I know it’s got to be something I’ve missed, but I don’t know what it might be.

Shouldn’t it be just like this?

/dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part2 /home          ext3       acl,user_xattr 1 2

I’m wondering about that myself. I’m headed to bed right now, but I’m going to check that tomorrow. I did find one interesting line in /var/log/messages, that bears on this:

kernel: EXT3-fs: Unrecognized mount option “1” or missing value

If that line is messed up, it’s because Yast’s partitioner did it! I never actually changed the options that Yast’s partitioner put on those lines in fstab.

OK, one other thing (and then I’ve GOT to go to bed!). I noticed earlier that when I cloned the drive, the fstab was (obviously) filled with the old information. I ran Yast’s partitioner to set up the new partitioning, but it didn’t delete all of the old lines. I manually cut those out myself.

I think Yast’s partitioner is excellent for a new partition, or during a new install. It’s less than wonderful for something like this.

Tomorrow, we look at the man pages and edit the bloomin’ fstab file ourselves. :slight_smile:

See you on the other side. It’s 7.30am here so get to bed. It’s late for U

Do at least a

ls -l /dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part2

to see if it points to /dev/sd2.

This is not correct:

/dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part2 /home ext3       acl,user_xattr        user,acl,1 2    

You seem to have to fields with fs-options. Check if this goes better:

/dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part2 /home ext3       acl,user_xattr        1 2   

repetition for emphasis

Sorry, I just started at the beginning and as the first few posts did not even mention this obvious error, I jumped to the conclusion that I could finish this off by pointing to it.

I admit, I should have read through all the posts first, but that takes so much time …:shame:

Yep, that’s what it was. If I knew more about the format of fstab lines, I would have seen that right away. I removed the extraneous info from the end of the 2nd line, and just used


/dev/disk/by-id...(snip)/home ext3  acl,user_xattr 1 2

… and it worked fine. (I used the correct and complete ID value, of course; I just snipped it above to make it easier to read here.) I still don’t have the splash screen in Grub, but I’ll fix that later, too. That’s not essential.

What this means, then, is that Yast’s Partitioner does indeed make mistakes on something like this. I just assumed that it would figure things out for me. But it left extraneous trash at the end of the fstab line, thus preventing the /home directory from being mounted.

I’m reminded of my earlier experience with Yast’s Firewall tool: it limited the number of entries in Firewall | Masquerading, without any warning or mention of the limitation in the help text. When I exceeded the equivalent of about 1024 characters in the SuSEfirewall2 file (in /etc/sysconfig), it just truncated the excess, leaving me with a SuSEfirewall2 file that contained errors.

Thanks again for the help. We got it. :slight_smile:

EDIT: one other thing that I just realized that I never mentioned here, and I most certainly should have: I’m using Opensuse 11.1, and not 11.2. It’s possible the partitioner has been tweaked for the latest release. I want to be fair.

man fstab

:wink:

At least we were on the right track:)

This should be a walk in the park for you @smpoole7 - with your experience;)

I’ve been thinking about doing some How-Tos.

Maybe the first will be, “How To Click The Wrong Thing.”

rotfl!

:stuck_out_tongue:

You expect me to read man pages? :slight_smile: