PDA

View Full Version : Knx. 3.2: partition naming



chada
04-08-2003, 12:38 AM
This newby actually completed the basic installation to hard drive several days ago, thanks to David McNab's (nz) fine clear HOWTO. While cfdisk gave no trouble (hda1 stayed with win2k, I also configured seven more (logical) drives, hda5 to hda11). It appears that I only got names on boot, root, and swap. I never saw an opportunity in setup to name the other 4 (usr, var, home, temp), so I guess setup ignored them.
Q. (1) How does one now check partition setup?
(2) Can one name these partitions now ?
(3) How to check a partition"s contents ?
(4) If, say usr partition is empty, how does one move usr directory into it without wrecking system?
tia, chada
Heil Knopper !javascript:emoticon(':idea:')
Idea

:idea:

Stephen
04-08-2003, 02:50 AM
Knoppix dumps everything into one partition.

#1- Open a console window type mount then enter to see the mounts in use on your system.

#2- You have to edit the /etc/fstab and put entries in for the "names"(mounts).

#3 - In a console window cd /usr then enter then ls and enter will show you the contents if you are thinking the /usr or /home are empty they are not the partitions you made were not used during install they are in the / partition.

#4- To move the directories you should boot from the CD mount the partitions you want your /usr /home to be on ie.

sudo mount /dev/hda? /mnt/hda? - the partition you want to move the directory too.

also mount the HD / partition and change to the HD / directory you want move ie.

cd /mnt/hda?/home - the /home you want to move.
cp -Rp * /mnt/hda?/ -copy to the mount of where you want to move /home too.

Edit the HD / fstab to mount the new /home ie.

/dev/hda? /home auto rw,auto,user,exec 0 0 - the new home mount

repeat the proccess for others. although you really should only need a seperate /home to keep your personal settings and files.
reboot and your new mounts should be available.

You could do all this without booting from the cd but I would not recommend it.

rickenbacherus
04-08-2003, 04:01 AM
Oh yeah- chada in order to see your partitions as root do:

cfdisk /dev/hda (or /dev/hdb, /dev/hdc etc.)

chada
04-08-2003, 05:10 AM
Super amswers from Messrs Cormier & Rickenbahcerus. Thanks very much. I must be very grateful, for this is my 4th try to get this balky form to send my message !
Now for a long pause to digest your answers.
Chada

chada
04-08-2003, 05:14 AM
Rickenbacherus !
entschuldigen sie bitte.
chada

rickenbacherus
04-08-2003, 06:14 AM
Rickenbacherus !
entschuldigen sie bitte.
chada

Is that German? Sorry no sprechen ze deutche (I can't spell in German either-heh heh :)

Stephen
04-08-2003, 07:54 AM
lmao - Really a very nice how-to though, both times!
Thanks, I cleaned it up did some reformating and put in the wiki here (http://www.knoppix.net/docs/index.php/HomePartitionHowTo).

Henk Poley
04-08-2003, 05:55 PM
lmao - Really a very nice how-to though, both times!
Thanks, I cleaned it up did some reformating and put in the wiki here (http://www.knoppix.net/docs/index.php/HomePartitionHowTo).
Nice :-)

I'll make the commands you need to type [b]bold[b], like in the rest of the wikis. And I think we should change the editor to something more newbie friendly... vi (and Emacs) take some time to master. Not really something you would want to do when you opened your fstab, I guess...

Just a shame that pico/nano are not on Knoppix. Anyone know another small and simple editor?

Shouldn't you explain how to remove the old /home after yo find out the new one is fully functional?

rickenbacherus
04-08-2003, 07:02 PM
Just a shame that pico/nano are not on Knoppix. Anyone know another small and simple editor?


While it may not be small I think Midnight Commander is not only easy to learn but is commonly included with most distros and you can install .debs from it. All the commands are available via a pull down menu. Just hit F9. All the 'F' key functions are also listed on the bottom of the editor window.

Just my 2 cents.

Stephen
04-08-2003, 07:19 PM
I'll make the commands you need to type [b]bold[b], like in the rest of the wikis.

That would be great.


And I think we should change the editor to something more newbie friendly... vi (and Emacs) take some time to master. Not really something you would want to do when you opened your fstab, I guess...

Just a shame that pico/nano are not on Knoppix. Anyone know another small and simple editor?

I couldn't agree more but from what I read on the Knoppix mailing list extra space is rather limited on the ISO. :( Being a HD install the person could always install their favorite editor although how would a newbie know what their favorite editor was???


Shouldn't you explain how to remove the old /home after you find out the new one is fully functional?

Your right I will add to the wiki but with the size of new HD who's gonna miss a couple mb. :wink:

chada
04-09-2003, 05:20 AM
Following the kind suggestions of messrs. Cormier & Rickenbacherus:
1.a: Type mount, enter. Report:
/dev/hda6 on / type ext3 (rw.errors=remount -ro)
/cev/root.old on /initrd type ext2 (rw)
none on /proc type proc (rw)
devpts on /dev/pts type devpts (rw.gid=5, mode=620)
usbdevfs on /proc/bus/usb type usbdevs (rw)
--------------------------------------------------------
normal?
----------
1.b: Type cfdisk/dev/hda, enter. Report:
My original partition schedule (as described above), appeared.
------------
2. I'm getting to this (slow learner). I understand you to mean that if I want the "mounts" to conform with my partition schedule, I must first edit etc/fstab, right? Is emacs my newbie weapon of choice here?
---------------
3. Did
cd/usr, enter, ls, enter. Report:
x1186 bin doc etc games include info lib local man sbin share src.
That tells me nothing about the partition, but tells me that directory /usr is not empty- right?
More later
Tia
chada

RockMumbles
04-09-2003, 05:26 AM
I think you may end up with problems if you move all of /usr to a separate partition, usually people just put /usr/local on a separate partition, and programs installed form source (compiled) will be there. I had a system with parts of /usr on a separate partition and I had some errors booting, and I had to manually run a program or 2 after the second partition was mounted.

I always put / and /home on separate partitions and generally use a /store partition for mp3's, iso's, etc.

rock

Stephen
04-09-2003, 06:04 AM
If you want all the partitions you made to show up in the mount command you have to edit the /etc/fstab and put entries in so that they will be mounted on boot. You could choose any editor you feel comfortable with it is just a matter of adding a couple of lines and saving the file so if you can do that with emacs then use it.

Yes the ls command showed the directory was not empty and everything was installed to hda6 and yes that tells you nothing about the partition only about the /usr directory on the / partition. If your /usr was on it's on partition then ls /usr would tell you what is in the directory and the partition because they are the same.

Rock is right you really do not need all those extra partitions (hda7-hda11) you should use cfdisk again and delete them and make either 1 or 2 partitions for your /home and maybe an extra for backups, mp3's etc...

My partitions are:
/swap
/
/home
/var/www - my web pages so I can share them among the three OS's I boot from.
/extra - mp3's, backups, iso, anything else also shared and on second hd.

chada
04-09-2003, 04:22 PM
Thank you, Stephen and Rock, for your advice. Simple is good. So following directions, I shall try to add a /home to the boot, root, and swap partitions already working....and report later.
chada

chada
04-10-2003, 09:37 PM
Now I have been back in cfdisk and reworked my partition schedule. Now, Win 2k is on hda1, and logicals hda5,6 & 8 are boot,root,& swap. And #7 is for home. Cfdisk refused to let me assign "extended" filesystem designation to #7. I druther ext3.
Now: following Stephen's answer to my question #4:
I booted the Kpx CD. The KDE desktop showed all my partitions except #8 (swap). Is that normal ?
In console, typed: "sudo mount /dev/hda7 /mnt/hda7
Reply: "mount: you must specify the filesystem type"
Good ! But...please...how do I tell it "ext3" ?
Tia,
Chada

Stephen
04-10-2003, 09:50 PM
Swap does not show up. sudo mount -t ext3 /dev/hda7 /mnt/hda7. Have you created the file system on #7 if not
sudo mkfs /dev/hda7 - creates file system ext2
sudo tunefs -j /dev/hda7 - converts file system to ext3.
then mount the partition.

chada
04-11-2003, 01:15 AM
Having read Stephen's (April 10- 8.50 PM) :
Still fearful of breaking something: to the question- have I created the filesystem on hda7 ? Cfdisk shows under FS Type for hda7: "Linux" . Therefore, the answer is yes, correct ?
Then next: type your line which starts "sudo tunefs.."
Right ?
Next: type line starting: "sudo mount -t ext3.."
Right ? Then I think I can follow remaining advice.
Tia
Chada

Stephen
04-11-2003, 01:45 AM
Yeah looks good to me, after you do the turnefs you can check again if you want and you will see linux ext3.

chada
04-11-2003, 05:16 PM
After Stephen's post: Apr.11/12:45AM:
My dummheit's keeping you awake. Sorry !
With Knx. CD booted, in console, typed: "sudo mount -t ext3 /dev/hda7 /mnt/hda7" Reply:
"mount: wrong fs type, bad option, bad superblock on /dev/hda7, or too many mounted file systems"
Then typed: "sudo mkfs /dev/hda7". Reply began: "mke2fs 1.32 (09-Nov-2002)", and then rolled out another 17 lines. Now I think for sure the filesystem is created on hda7.
Next, wishing to convert filesystemto ext3, typed: "sudo tunefs -j /dev/hda7". Reply:
"sudo: tunefs: command not found"
What next, o kind and patient one ?
Chada

RockMumbles
04-11-2003, 06:47 PM
it should be:

tune2fs -j device

rock

Stephen
04-12-2003, 12:59 AM
Then typed: "sudo mkfs /dev/hda7". Reply began: "mke2fs 1.32 (09-Nov-2002)", and then rolled out another 17 lines. Now I think for sure the filesystem is created on hda7.
Next, wishing to convert filesystemto ext3, typed: "sudo tunefs -j /dev/hda7". Reply:
"sudo: tunefs: command not found"
What next, o kind and patient one ?
Chada

The file system is created (ext2) so if you want to you could move the /home now and do the tunefs after you re-boot.

chada
04-12-2003, 05:39 AM
Thanks, Rock, for your advice (April 11, 5.47PM)
Booted Knx. CD; in console typed:
"sudo tune2fs -j /dev/hda7". Reply was about 4 lines which said nothing about ext3, so I swore for a while.
I then exited the CD, then booted the HDrive, opened cfdisk, and the filetype showing for hda7 was ext3 !
Jubilation ! That's for sure, right ?
-----------------------------------------
Think tomorrow, following Stephen's advice already given, I can get /home to move to hda7.
Thanks again,
Chada

Stephen
04-12-2003, 06:00 AM
The four lines were telling you that it was creating the journal for the ext3 filesystem. You should have it beat now. Good luck.

chada
04-12-2003, 06:51 PM
Thought we were in the home stretch, but.....
From what I can see, hda7 is in order: created and mounted.
If cfdisk shows ext3 against hda7, can I take that as proven? Is there another way to check?
Following Stephen's answer to my question #4, to move /home to hda7, assuming that hda7 is all in order, I booted the CD and in console,
typed: "sudo mount /dev/hda7 /mnt/hda7". Reply:
there was no comment; a new prompt came up; took that to mean "hda7 is mounted arready!"
Then typed:"cd /mnt/hda7/home". Reply: "No such file or directory"
Stuck again....suggestion please ?
Chada

Stephen
04-12-2003, 07:45 PM
Now you have to move the old home directory to the /mnt/hda7 and change the /etc/fstab.

sudo mount /dev/hda6 /mnt/hda6 - orginal home partition
sudo mount /dev/hda7 /mnt/hda7 - new home partition
cd /mnt/hda6/home - change to original home
sudo cp -Rp * /mnt/hda7/ - copy original home to new
then add the line to /etc/fstab:
/dev/hda7 /home ext3 rw,auto,user,exec 0 0
save the file and re-boot and you have now copied the /home to hda7 and it will be used on boot as /home.

The hda7 was mounted and you had the error because you have not moved the /home yet.

To add the line to /etc/fstab:
sudo vi /mnt/hda6/etc/fstab - open the fstab for editing.
insert - hit insert key to put vi in insert mode.
arrow down - use arrow down key to move down the file.
enter - hit enter key to create new open line.
type in the fstab line above.
esc - hit esc key to take vi back to command mode.
shift : - use the shift colon key to execute command you will see a : at bottom of screen.
x! - type x the shift + 1 to for !. The command will look like : x! at bottom of screen
enter - hit the enter key which will save the file without asking for conformation.
re-boot.

chada
04-16-2003, 12:31 AM
Further to Stephen's of April 12th, 6:45 pm
---------------------------------------------------
I am pleased, really PLEASED (!) to report that I followed this perfect little guide with full success.
Only one small glitch now remains. During Knx. original install, I set up swap in hda11. And it still appears so in fstab, even though I have now rewritten my partition schedule in cfdisk: Win2k, boot, root, home & swap (hda1,5,6,7 &8).
How do I correct this, please ?
Chada

chada
04-16-2003, 12:34 AM
In my last, please re3ad the number 8 in place of the smiley.
chada

Stephen
04-16-2003, 05:10 AM
Edit the fstab again and change the 11 to 8 and re-boot and the swap will be used as long as you made hda8 as type swap when you used cfdisk.

chada
04-18-2003, 10:16 PM
Stephen's last advice (16 Apr. 4:10 AM) worked 4 me.
So ! Now everything (partitions, directory locations, & fstab) is in order.
I have many setup chores yet to do, but this process has given me a lot of confidence that I may actually make it to the finish line
For a lot of patience and careful, clear advice, to Stephen, the Rickenbacherus, & RockMumbles: thanks a lot !
Heil Knopper !
Chada

Stephen
04-18-2003, 11:45 PM
Good to hear you got it done.