This is an install of openSUSE-11.2 32bit. Obvoiusly, during the fresh install something went wrong. The HDD has 4 primary partitions, meant for /boot / swap /home (in that order). Instead of /home partition /dev/sda4 is mounted on /usr.
Currently it looks like this:
# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000cbdf6
Device Boot Start End Blocks Id System
/dev/sda1 * 1 257 2064321 83 Linux
/dev/sda2 258 16641 131604480 83 Linux
/dev/sda3 16642 17154 4120672+ 82 Linux swap / Solaris
/dev/sda4 17155 60801 350594527+ 83 Linux
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 129537660 53126008 69831428 44% /
udev 1009032 312 1008720 1% /dev
/dev/sda1 2031888 86140 1842532 5% /boot
/dev/sda4 345093228 62382236 265181268 20% /usr
# cat /etc/fstab
/dev/disk/by-id/ata-WDC_WD5000AAKS-00UU3A0_WD-WCAYU3940633-part3 swap swap defaults 0 0
/dev/disk/by-id/ata-WDC_WD5000AAKS-00UU3A0_WD-WCAYU3940633-part2 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/ata-WDC_WD5000AAKS-00UU3A0_WD-WCAYU3940633-part1 /boot ext4 acl,user_xattr 1 2
/dev/disk/by-id/ata-WDC_WD5000AAKS-00UU3A0_WD-WCAYU3940633-part4 /usr ext4 acl,user_xattr 1 2
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
To fix this I have the following plan:
-
Copy (rsync) /usr to a new directory /usrbak. Obviously /usrbak will be created under / on /dev/sda2.
-
Comment out the fstab line for /dev/sda4
-
Make a copy of the mv command in /root/bin
-
umount /usr (here it may bite me
) ???
-
Rename /usrbak to /usr
-
Reboot
-
Mount /dev/sda4 on a new mountpoint /homebak
-
Wipe out everything on /homebak, copy /home to /homebak
-
umount /home, fix the fstab entry for /dev/sda4 to mount on /home
-
Reboot
Any comments? This is a remote server, only accessible with ssh.