|
FreeBSD Installation and Upgrading Installing and upgrading FreeBSD. |
|
Thread Tools | Display Modes |
|
|||
Creating 2 slices
Hello,
I'm thinking of creating two FreeBSD slices (BIOS partitions) on the same disk: one for /, /tmp, /var, /usr and the second for /home. 1. Is this possible? 2. If I ever reinstall the system or install a new version, will sysinstall keep all files under /home intact (I believe there's a flag for that in disklabel)? Thank you.
__________________
May the source be with you! |
|
|||
Re: 1.
Yes that is possible Re: 2 Sysinstall will only touch those slices, you tell it to touch. Remember that each FreeBSD slice has it's own disklabel. Your "/etc/fstab", which contain the instructions for 'mount" will thus look something like this: Code:
/dev/ad0s1a / bla,bla,bla /dev/ad0s2d /home bla,bla,bla
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Ok, I created a third slice using "fdisk -u ad0" and following the instructions. It created /dev/ad0s3, /dev/ad0s3a and /dev/ad0s3c.
Isn't "a" usually used for "/"? Anyway, /dev/ad0s3a seems to occupy most of the space available on the slice. So I did newfs on /dev/ad0s3a and it seems to work fine. How would I create ad0s3d? I tried "bsdlabel -e ad0s3", copied the already existing "a" line and just changed the letter "a" to "d", but when I do a "wq", it doesn't write anything. I did "bsdlabel -e ad0s3" again and all changes were gone.
__________________
May the source be with you! |
|
|||
Fdisk is only used to create slices (MBR partitions). It will not create labels.
You have to use bsd/disklabel to divide a slice in different sub-partitions. Each of these sub-partitions are defined by a starting sector (offset in bsdlabel) and a size. So just copying the offset and size and changing the label will never work. That would create two identical sub-partitions, which is not allowed.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Quote:
By default, if I do a bsdlabel -w /dev/ad0s3 then bsdlabel -e /dev/ad0s3 I see partitions "a" and "c" in vi. In my last post I was asking about this "a" partition. Isn't it always used for the system's root filesystem "/"? From your first reply, you suggested I create a "d" partition: Code:
/dev/ad0s1a / bla,bla,bla /dev/ad0s2d /home bla,bla,bla That's what I'm doing. Is it the proper way to do it? 1. fdisk -u ad0 ; follow the steps and add a third slice 2. bsdlabel -w /dev/ad0s3 ; this creates /dev/ad0s3a and /dev/ad0s3c 3. bsdlabel -e /dev/ad0s3 ; change "a" to "d" and save 4. now there's /dev/ad0s3c and /dev/ad0s3d 5. newfs -U /dev/ad0s3d 6. mount /dev/ad0s3d /mnt/new
__________________
May the source be with you! |
|
|||
Yes, label "a" is used for the "/" root partition. However if you use multiple slices, you can use it for another partition, if you like. Personally, I try to prevent using "a" for a non-root partition. It is just my preference
Quote:
Now do: Code:
6) mkdir /home 7) edit /etc/fstab to add : /dev/ad0s3d /home, followed by the filesystem stuff and mount options
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Thanks very much.
__________________
May the source be with you! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating port | backrow | OpenBSD Packages and Ports | 9 | 9th September 2009 11:55 AM |
Command to find and replace, but not creating a new file | 18Googol2 | Programming | 4 | 22nd September 2008 10:28 PM |
Creating a flash player | jgroch | Programming | 0 | 21st August 2008 05:27 AM |
how to mount Open solaris UFS slices | whispersGhost | FreeBSD General | 12 | 20th May 2008 02:56 PM |