You can edit /etc/fstab with a more intuitive editor, such as pico
or nano, if you have those on Ubuntu.
This is my server's fstab using four drives:
Code:
root@paul:/home/mingdao# cat /etc/fstab
/dev/sda1 swap swap defaults 0 0
/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
/dev/hda3 /tmp reiserfs defaults 1 2
/dev/hda5 /home reiserfs defaults 1 2
/dev/sdb1 /backup reiserfs defaults 1 2
/dev/sda2 /var reiserfs defaults 1 2
/dev/hdc1 /backup2 reiserfs defaults 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
The first field, (fs_spec), describes the block special device or remote
filesystem to be mounted. Yours would be /dev/hdbx where x is whichever
partition(s) you would like to mount.
The second field, (fs_file), describes the mount point for the filesystem.
Since you don't have any, you would need to make them and give them the
proper
permissions.
The third field, (fs_vfstype), describes the type of the filesystem.
The fourth field, (fs_mntops), describes the mount options associated
with the filesystem.
The fifth field, (fs_freq), is used for these filesystems by the dump
command to determine which filesystems need to be dumped. If the fifth
field is not present, a value of zero is returned and dump will assume
that the filesystem does not need to be dumped.
The sixth field, (fs_passno), is used by the fsck program to determine
the order in which filesystem checks are done at reboot time.
You can read these by issuing "man fstab" in a terminal. I've never seen
a "fdisk -l" output such as your hdb. I thought everything after the extended
partition automatically started at 5 -- guess I was wrong. I don't even see
how that can work. You have:
/dev/hdb1 from 1 to 1275
/dev/hdb2 from 12834 to 14593 (as extended)
/dev/hdb3 from 1276 to 3825
/dev/hdb4 from 11247 to 12833 (but where are blocks 3826 to 11246?)
then /dev/hdb5 through /dev/hdb9 are in reversed order.
I don't know what systems you have in hdb, or which ones you want to mount.
But if you could share that, we'd be glad to give you an example. This is just
a for instance, but might help you to proceed.
Say that /dev/hdb1 is the previous Ubuntu / (root) filesystem, /dev/hdb3 is the
previous Ubuntu /home filesystem. You could use:
Code:
/dev/hdb1 /Ubuntu-root reiserfs defaults 1 2 <-- if not reiserfs, change it appropriately
/dev/hdb3 /Ubuntu-home reiserfs defaults 1 2 <-- if not reiserfs, change it appropriately
How to mount if other than "defaults" depends upon the filesystem of the
partition and you're intended use, i.e., read/write, read-only.
If you just need to temporarily copy files, you could issue as root:
mount -t reiserfs /dev/hdb1 /mnt/hd
again, assuming reiserfs is the filesystem, and you have the mount point
of /mnt/hd in your system.
Then you could issue as root:
cp -a /mnt/hd/file /destination/mount/point/
and it would copy the files and keep the timestamp and permissions intact.