how to automount ext3 partition

hi,
i have a data partition which i’d like to automount on boot, last time i remember it was easier, fstab content is somewhat different than most of tutorials i think, with disk by-id and when i simply put dev/sda 5 and repeated values from the second line of fstab it didnt work.

fdisk -l output:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x29292928

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         131     1052226   82  Linux swap / Solaris
/dev/sda2   *         132        3367    25993170   83  Linux
/dev/sda4            3368       14593    90172845    5  Extended
/dev/sda5            3368       14593    90172813+  83  Linux

fstab looks like this:


/dev/disk/by-id/ata-ST3120026AS_5LJ0EDFM-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST3120026AS_5LJ0EDFM-part2 /                    ext3       acl,user_xattr        1 1
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

crystalnewbie,

>
> hi,
> i have a data partition which i’d like to automount on boot, last time
> i remember it was easier, fstab content is somewhat different than most
> of tutorials i think, with disk by-id and when i simply put dev/sda 5
> and repeated values from the second line of fstab it didnt work.

> /dev/disk/by-id/ata-ST3120026AS_5LJ0EDFM-part1 swap swap
> defaults 0 0
> /dev/disk/by-id/ata-ST3120026AS_5LJ0EDFM-part2 / ext3
> acl,user_xattr 1 1

Just replace the above lines with these in /etc/fstab

/dev/sda1 swap defaults 0 0
/dev/sda2 / ext3 acl,user_xattr 1 1

Using the device name or device id are just two different ways to access a
device. It doesn’t matter which one you use.

As for the data partition you need to tell it where to mount. For example;
/dev/sda5 /mnt ext3 acl,user_xattr 0 0

I take it you’re able to mount the data partition manually.


Niclas Ekstedt, CNA/CNE/CNS/CLS
Systems Engineer
Atea Sverige AB

Niclas Ekstedt wrote:
> crystalnewbie,
>
>> hi,
>> i have a data partition which i’d like to automount on boot, last time
>> i remember it was easier, fstab content is somewhat different than most
>> of tutorials i think, with disk by-id and when i simply put dev/sda 5
>> and repeated values from the second line of fstab it didnt work.
>
>> /dev/disk/by-id/ata-ST3120026AS_5LJ0EDFM-part1 swap swap
>> defaults 0 0
>> /dev/disk/by-id/ata-ST3120026AS_5LJ0EDFM-part2 / ext3
>> acl,user_xattr 1 1
>
> Just replace the above lines with these in /etc/fstab
>
> /dev/sda1 swap defaults 0 0
> /dev/sda2 / ext3 acl,user_xattr 1 1
>
> Using the device name or device id are just two different ways to access a
> device. It doesn’t matter which one you use.

It can matter. For example, I’m testing an LS-120 device, which looks
both like a floppy and a 100 MB hard drive. When I installed it, it
became /dev/sda, and my system disk was moved to /dev/sdb. If my
drives had not been specified by device id, my system would not have
booted!

Add a line to fstab

/dev/sda5 /mnt/my_data  ext3       defaults              1 2

Or you can use the Yast Partitioner to mount it. Just enter a mount point and follow it thru…
Be careful in there.

FSTAB - Editing Manually - openSUSE Forums

And you might be helped in understanding his all abit better with SDB:Basics of partitions, filesystems, mount points - openSUSE.

And mounting on boot is not called ‘automount’.

thanks guys :slight_smile:

Mounting is our speciality:O
Hope it worked for you.:wink:

Larry Finger,

>> Using the device name or device id are just two different ways to access a
>> device. It doesn’t matter which one you use.
>
> It can matter. For example, I’m testing an LS-120 device, which looks
> both like a floppy and a 100 MB hard drive. When I installed it, it
> became /dev/sda, and my system disk was moved to /dev/sdb. If my
> drives had not been specified by device id, my system would not have
> booted!

That’s true.


Niclas Ekstedt, CNA/CNE/CNS/CLS
Systems Engineer
Atea Sverige AB