cannot login to Ubuntu & /home Directory ismissing

Asked by newborn

Hi all I tried moving my /home directory to another partition( http://www.psychocats.net/ubuntu/separatehome). Thing were ok I think till I typed "gksudo gedit /old/etc/fstab". I got an error msg on the gedit page & when I tried to login to ubuntu aghain I get the msg "your home directoy doesnot exist. Do you want to log in with the /root directory as your home directory? Tried to correct it as per instructions but I get the msg no such file or directory.
Searching around I seen that in text mode I can see the home_backup directory containing all my files, so how can I complete shifting my home directory to the other partition & keep ubuntu on my 1st partition or set things correct.
I have 2 hdd one a 40 gB having Hda1 & Hda2 ( containing win XP & Win 98) and the 2nd a 80 GB with Hdb1&2. Hdb1 contains Ubuntu 6.06 lts & was trying to move my home directory to HDB2 as I wanted to change to 8.10
Also I cannot use my Live Cd as my old Cdrom wwas faulty & I just have got a Sata DVD writer which is connected to the mobo through a pci raid controller. How can I get the bios to regognise the optical drive.

Please help

I had earlier posted my question no 66862 for which I had given additional information as requested.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andy Ruddock (andy-ruddock) said :
#1

Login as root, type

mount -t /dev/hdb2 /home

check that the home directories are mounted correctly.
If they appear to be ok, edit fstab to add

/dev/hdb2 /home ext 3 relatime 0 2

Revision history for this message
Tom (tom6) said :
#2

Are you two sure you mean hda and hdb rather than sda and sdb? Ahh, 6.06 still uses the more precise hda, hdb terms? :)

In the psychocats instructions it seems to put a lot of effort into constantly backing everything up and creates some confusion about /old and /new etc. At the very end it gives the command

/dev/hdb2 /home ext3 nodev,nosuid 0 2

whereas Andy gives us "relatime" instead of "nodev,nosuid", is the explanation of these terms quite complex? Is there a cheat-sheet where we can look up these terms?

Can the Cd-drive be written into the fstab too so that newborn can install 8.10 (or 8.04) from Cd?

Sorry, it's cheeky for me to ask all these but they seem like basic things i should learn about.
Thanks and regards from
Tom :)

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#3

Those options are used by the kernel when the filesystem is mounted to define what actions can (or cannot) be performed on files on that filesystem.

nodev means that the filesystem cannot contain special devices which would normally be in /dev
nosuid means that programs run from that filesystem cannot have the uid bit set (or if it is set it will be ignored) - this is usually used to enable programs to run with the privileges of another user (usually root)
relatime defines how timestamps on files are updated it's a more efficient method of keeping track of when files were last accessed.

You can use all (or none, or a combination) of these options - I added relatime simply because that is the default for mounting filesystem with Ubuntu.

Revision history for this message
newborn (venuwarrior70) said :
#4

Thanks Andy & Tom,

In text mode entered the mount command using sudo, since I was not sure how to login in as root. how can I confirm that it has been mounted

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#5

You'd have got an error message if it didn't mount.
If you type

mount

on its own on the command line you'll get a list of the mounted partitions.

Also typing,

ls /home

will show the files (that's LS is small letters)

Revision history for this message
newborn (venuwarrior70) said :
#6

Thanks Andy & Tom,

In text mode entered the mount command using sudo, since I was not sure how to login in as root. how can I confirm that it has been mounted

Revision history for this message
newborn (venuwarrior70) said :
#7

Hi Andy

Typed mount & the output doesnot show HDB2, itshows Hdb1, proc,/sys......hba1& 2...now what

Revision history for this message
newborn (venuwarrior70) said :
#8

Hi when I type ls in text mode it shows the following directiories bin, dev, home_backup, lib, mnt, opt, sbin, tmp, vmlinuz, boot, etc, initrd, lost + Found, new, proc, srv, usr, cdrom, home, initrd.img, media, old, root, sys, var.

home_backup has all the files that were there in home file.

How can I put it back in the right place or complete shifting it to hdb2 so that I can removeubuntu 6.06 & load ubuntu 8.10

Revision history for this message
Tom (tom6) said :
#9

Ok, can you go up to the top taskbar and click on

System - Administration - Partition Editor

be careful as this is a very powerful tool for deleting partitions! Go up to the button at the top right-hand corner and click it to change it to sdb. Please let us know what the partitions are labelled as.

Thanks, good luck and regards from
Tom :)

PS
@ Andy, thanks for telling us what the options were about :)

Revision history for this message
newborn (venuwarrior70) said :
#10

Tom,

I unfortunately cannot loginto ubuntu so I will not be able to check that. But I can tell you that i have Hda1 & 2 and Hdb1,2 & 3

Revision history for this message
Tom (tom6) said :
#11

Sorry, i meant using the LiveCd session

Revision history for this message
newborn (venuwarrior70) said :
#12

I have /dev/sdb1 & /dev/sdb2

Revision history for this message
Tom (tom6) said :
#13

I'm stuck. I was hoping to find an obvious glitch that i could deal with but it seems that hdb2 is there and mounted and has /home on it but that we can't seem to mount the /home :(
It doesn't look like the

mount -t /dev/hdb2 /home

command worked? So we can't go on to adding the line

/dev/hdb2 /home ext 3 relatime 0 2

to the fstab?

Revision history for this message
newborn (venuwarrior70) said :
#14

I am able to start a live cd of 8.10 ,so how can I copy my data from home_backup to hda1 or 2 or hdb2 so that I can format hdb1 & load ubuntu 8.10.

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#15

Instead of my previous suggestion, use :

mount -t /dev/sdb2 /home

and add

/dev/sdb2 /home ext 3 relatime 0 2

to /etc/fstab.

Drives used to accessed /dev/hda, /dev/hdb ... with /dev/sda, /dev/sdb ... being reserved for scsi drives. With the introduction of sata drives most hard drives are now accessed via /dev/sda, /dev/sdb ...

Revision history for this message
newborn (venuwarrior70) said :
#16

Hi Andy, when I enter the command I get an output
Usage: mount -V :print version
           mount-h : print this help
           mount : list mounted file systems;
           mount -l: idem, including volume lables
So far the informational Part. Next the mounting.
The command is 'mount [ -t fstype ] something somewhere.'
Details found in etc/ fstab may be ommitted.
           mount -a [........................................
           mount device: mount device at the known place
etc etc
I basically have to type all this from my deskop to Lap top. How can I just retrieve my data from where I know it is so that I can reformat the HDD & load it afresh

Revision history for this message
Tom (tom6) said :
#17

Can you try opening the web-browser on your LiveCd session and post directly into this thread from there? Hopefully it should be fairly easy to open a terminal console and type in

sudo nautilus

in order to get a file-browser that allows you to navigate to the appropriate folders/partitions in order to copy things across with SuperUser/Root privileges. I'm not completely certain it's possible or even wise but hopefully it might help.

Good luck and regards from
Tom :)

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#18

Sorry, that should be

mount -t ext3 /dev/sdb2 /home

Revision history for this message
newborn (venuwarrior70) said :
#19

Thanks Andy,

That mounts my hdb2 but how can i shift my files that are in home_back up to the /home file. Also how do i get into the etc/fstab to edit the line so as to continously mount hdb2

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#20

Start a Live CD session and open a terminal.

Enter

sudo mkdir -p /mnt
sudo mount -t ext3 /dev/sdb1 /mnt
sudo nano /mnt/etc/fstab

At this point you're editing the /etc/fstab for your installed Ubuntu

add the line

/dev/sdb2 /home ext 3 relatime 0 2

then press Ctrl-X to quit, pressing 'Y' to enable the changes to be saved.

Then reboot, home will be mounted from the second partition to where you've already copied your home files.

Revision history for this message
newborn (venuwarrior70) said :
#21

sorry I forgot to mention that I see the home_backup directory on my 1st partition itself when I type ls after login. It contains the home directory which is marked as venu then all the files. So now what should I do?

Sorry I know I am asking step by step instructions but I am not too conversant with linux

Revision history for this message
Tom (tom6) said :
#22

I'm slightly losing track of what's going on. So, to re-cap. You used to boot quite happily into Windows and Ubuntu 6.06 but needed to upgrade and followed some very confusing guidelines up to a point where you could no longer boot into Ubuntu but can still boot Windows? Ubuntu complains that it can't find /home, because it's now called something different?

From the instructions you followed before arriving in the Answers forum you have got a backup of your /home folder but it's really just the original and has just been renamed?

You now need to copy that backup onto the partition you want to use as the /home partition (sdb2?) and the new copy needs to be called /home rather than what it's called at the moment? I think this is the crucial thing to do at this point. Everything should fall into place when you've done this.

Then you can follow Andy's advice in order to fix the 6.06 so that it does see the new /home on the new partition? That should then mean you can boot into the 6.06. After that you're going to install 8.04 (or 8.10) over the top of the 6.06? I have a couple of trick's for this install to try to avoid losing any data but we can worry about that later, after we have seen 6.06 boot up nicely, hopefully :)

It's all looking quite hopeful :)) (so i must have missed something? lol)
Good luck and regards from
Tom :)

Revision history for this message
newborn (venuwarrior70) said :
#23

thanks, but how can i move the contents of directory home_backup to home befor I complete what Andy instructed

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#24

If you boot into a LiveCD session and open a terminal window.

mkdir -p /mnt/sdb1
mkdir -p /mnt/sdb2
mount -t ext3 /dev/sdb1 /mnt/sdb1
mount -t ext3 /dev/sdb2 /mnt/sdb2

Now we have our original root filesystem mounted at /mnt/sdb1 and our new /home filesystem mounted at /mnt/sdb2
/mnt/sdb2 should be empty
/mnt/sdb2/home_back is the backup of the original home directories

To copy our home directories to where they'll finally be accessed

mv /mnt/sdb1/home_back/* /mnt/sdb2

Finally, edit the real /etc/fstab

nano /mnt/sdb1/etc/fstab

adding the line

/dev/sdb2 /home ext3 relatime 0 2

as previously discussed.

Fingers crossed ...

Revision history for this message
Tom (tom6) said :
#25

I was thinking CoPy rather than MoVe but really just getting the data to sdb2 is the issue that matters. Nicely done Andy :)

Revision history for this message
newborn (venuwarrior70) said :
#26

hi Andy, when I try to write to fstab i get an error writing /mnt/hdb1/etc/fstab: Permission denied. What should I do

Revision history for this message
Tom (tom6) said :
#27

Sudo it.

sudo nano /mnt/sdb1/etc/fstab

should help, as it makes you SuperUser ;)

Can you help with this problem?

Provide an answer of your own, or ask newborn for more information if necessary.

To post a message you must log in.