LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > DamnSmallLinux
User Name
Password
DamnSmallLinux This forum is for the discussion of DamnSmallLinux.

Notices


Reply
  Search this Thread
Old 02-21-2007, 09:11 AM   #1
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
Mount the /home on a different partition


Hi

I'm actually playing around with an old 486 and I've installed DSL 3.1 on it. Now, as the BIOS only supports a 512MB partition to boot from and as I have installed a 2GB drive, I'd like to mount the /home partition from hda3 (hda2 being swap). Do I have to edit mtab? I've already added "home=hda3" to menu.lst (GRUB bootloader configuration file). However, it has no effect. Hda3 currently must be mounted manually (but seems to work). Filesystem is ext2, if this matters.

Thanks for your help

PS: How do I change the machine to do an autologin?

Last edited by hansalfredche; 02-21-2007 at 09:58 AM.
 
Old 02-21-2007, 09:46 AM   #2
snowtigger
Member
 
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364

Rep: Reputation: 35
You need to edit fstab. It is in /etc.
Do not edit mtab as this is not a static file, it gets deleted during a reboot.

 
Old 02-21-2007, 12:17 PM   #3
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Original Poster
Rep: Reputation: 31
Thanks

The system is booting up. I already did some editing in /etc/fstab and will post its content. However that boot command shouldn't it be home=/dev/hda3 instead of home=hda3. I'm unsure ...

Here we go for the /etc/fstab file. As I have to copy it manually I only copied the relevant line:

Quote:
/dev/hda3 /home ext2 defaults 0 0
What did I forget?

EDIT: setting the home boot command to /dev/hda3 didn't help.

Last edited by hansalfredche; 02-21-2007 at 12:37 PM.
 
Old 02-21-2007, 01:18 PM   #4
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Original Poster
Rep: Reputation: 31
Dooo! I've edited the /etc/fstab file and changed the last number from zero to either 1 or 2 like that:

Quote:
/dev/hda3 /home ext2 defaults 0 1
What is that last number for? hda1 has the numbers "0 1", should I change it to "0 0"?

Result during boot time: e2fsck complains: Filesystem has unsupported features. Get a newer version of e2fsck.

All partitions were created with Gparted featured in the latest Knoppix. Why does it only complain for hda3 and not for hda1 (it's reported clean)? The ext2 specs didn't changed lately?

Last edited by hansalfredche; 02-21-2007 at 01:19 PM.
 
Old 02-21-2007, 02:38 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
What is that last number for?
From the fstab(5) manpages:
Quote:
The sixth field, (fs_passno), is used by the fsck(8) program to deter-
mine the order in which filesystem checks are done at reboot time...
 
Old 02-21-2007, 03:39 PM   #6
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Original Poster
Rep: Reputation: 31
Thanks.

The reason why I didn't got any error messages so far is because 0 means no check. However, this still doesn't tell me what's wrong. /dev/hda3 doesn't get mounted as /home at boot time. Why not? There are no error messages other than that of e2fsck. Should I format that partition again? There is nothing important on it.
 
Old 02-21-2007, 03:42 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Well, can you mount it after the box has booted? ...

If no, then format it again. After formatting, make sure you can mount it from the command line.

If yes, then post the rest of your /etc/fstab.
 
Old 02-24-2007, 10:20 AM   #8
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Original Poster
Rep: Reputation: 31
I can mount something, but it is bizarre. When I mount /mnt/hda3, it seems to mount something like my home directory while when I mount /home, there was only some lost+found directory. Here we go for the fstab, if the floppy does work.

Quote:
/dev/hda1 / ext2 defaults,errors=remount-ro 0 1
/dev/hda2 none swap defaults 0 0
/dev/hda3 /home ext2 defaults 0 2
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
/dev/fd1 /floppy2 vfat defaults,user,noexec,showexec,unmask=022 0 0
# partitions found by dsl
#/dev/hde1 /mnt/hde1 ext2 noauto,users,exec 0 0
#/dev/hda1 /mnt/hda1 ext2 noauto,users,exec 0 0
#/dev/hda2 /mnt/hda2 auto noauto,users,exec 0 0
#/dev/hda3 /mnt/hda3 auto noauto,users,exec 0 0
What could be wrong? And must I now pass home=hda3 or home=/dev/hda3 in menu.lst?
Formating hda3 made the e2fsck errors disappear.

Last edited by hansalfredche; 02-24-2007 at 12:36 PM.
 
Old 02-24-2007, 10:07 PM   #9
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Let's back up a second. There is nothing you need to be changing in your grub configuration file. Eliminate that from the equation.

It looks to me like you've set up /etc/fstab correctly. Here's the scenario:
  • You have created a new filesystem with nothing on it.
  • When /dev/hda3 is not mounted, you should see your normal /home directory. Currently it's on the same filesystem as /, which is /dev/hda1.
  • When /dev/hda3 is mounted, you should see an empty /home directory (+ lost+found, as you noted). This is because your newly mounted filesystem is overlaying your existing /home directory.

Here is what you can do. Create a /home-new directory. Mount /dev/hda3 to /home-new. Copy (preserving permissions) everything from /home to /home-new. You can use -Rp options from the cp command, or you can use tar with similar options - your choice.

Next, as root (or a sudoer), mv /home-new to /home. You'll have to use the -f option.

Unless I've overlooked some detail, you should be in business after that. Make sure you carefully follow all the steps and ask questions if you get confused.
 
Old 02-25-2007, 12:12 PM   #10
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Original Poster
Rep: Reputation: 31
Thanks. I managed it to get to work. For future reference I'm writting a possible solution. I did what you proposed, but this resulted in an message complaining that /home wasn't found just after the login screen (and only when login in as user). In this case, pressing CTRL-C, login in as root and mounting the partition manually solves the problem as long as the machine isn't shut down. That is however not what is expected, so one has to open a text editor and edit the following file /opt/bootlocal.sh

Quote:
(as root)
beaver /opt/bootlocal.sh
There you add following line

Quote:
mount /dev/hda3
Of course, adapt /dev/hda3 to wathever has to be mounted. This solved the problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount ext3 partition in /home/USER/Documents with read/write/execute acces for USER anonymous234 Linux - Hardware 2 01-12-2007 12:23 PM
/home is in extended partition. how to mount manually? damienduff Debian 4 01-31-2006 12:37 AM
/home partition will not mount at boot despite fstab settings zach_barrow Slackware 11 03-10-2005 10:24 PM
how to mount an old /home partition? snakeo2 Mandriva 6 12-20-2004 09:15 PM
mount / , /home , /home/usr on different partitions alekoos Slackware 14 05-03-2004 11:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > DamnSmallLinux

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration