Re: Mounting 2nd Partition
Dennis Dixon <dixon@dixonadvise.com> writes:
DD> The first issue, do I have a swap partition activated and mounted?
DD> When I boot I get the message "activating swap partition" but
DD> shouldn't it be in 'etc/mtab', 'proc/mounts', and 'mount -t swap'?
Swap partitions don't get "mounted" the way partitions with
filesystems do. '/sbin/swapon -s' will list your swap partitions, and
'free' will show you the total amount of active swap space.
DD> Are there commands that I can use to permanently activate and mount
DD> partitions without using the rescue disk?
You need to edit the /etc/fstab file by hand. You can just copy
existing lines and modify them, or see the fstab(5) man page for more
information.
DD> The second issue, is a separate partition (hda6) which I have
DD> allocated the vast majority of my memory space to. This clearly
DD> doesn't exist at all. Trying to remedy this, I booted from my
DD> rescue disk, activated and mounted hda2 as root, then activated
DD> and mounted hda6 as usr2. After exiting the rescue disk and
DD> rebooting I did have a 'usr2' directory, but it was located in
DD> hda2.
DD> When I do this, is it safe to mount hda6 as '/usr' or will this
DD> wipe out all the existing data on /usr in hda2? (The solution is
DD> to mount hda6 as usr2, 'cp usr usr2', then rename usr2 to usr
DD> somehow?)
The latter is (almost) the right thing to do. Make sure you use
'cp -a' (or another tool, like tar) to move files between partitions,
preserving things like symlinks and permissions. Mounting a different
filesystem on /usr will hide anything else that was there before, so
you want to:
mount /dev/hda6 /usr2
(cd /usr; tar cf - .) | (cd /usr2; tar xpf -)
umount /usr2
mount /dev/hda6 /usr
(Note that I use tar here instead of cp -a. Either should work.)
You'll now have the /dev/hda6 version visible under /usr. If you're
convinced that this is complete and works, you can umount /usr, clean
out the /dev/hda2 version of /usr, and then re-'mount /dev/hda6
/usr'. Also make sure you update your fstab to show that hda6 should
mount on /usr.
--
_____________________________
/ \ "Dad was reading a book called
| David Maze | _Schroedinger's Kittens_. Asexual
| dmaze@mit.edu | reproduction? Only one cat is in the box."
| http://donut.mit.edu/dmaze/ | -- Abra Mitchell
\_____________________________/
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: