HOWTO: Modern FreeBSD Install (vermaden way)

mfaridi said:
in section 1.7 when I type
Code:
umount /NEWROOT/var
I see error about /var is not root file system , so it can not unmount it
I see this error about /usr
when I want umount /NEWROOT , Isee error about /NEWROOT is busy

Just for the record, I'm getting the exact same error as this guy. Pretty sure I followed the guide command for command. I'll give it another go but the output of
Code:
mount
shows that /NEWROOT/*** isn't mounted anywhere
 
after I type
Code:
mount
I understand var mount in
Code:
/var
and usr mount in
Code:
/usr
so I run this command
Code:
umount /var && unmount /usr && unmount /NEWROOT && reboot
after reboot system go to single user mode and I continue installation and right now I have FreeBSD with ZFS
Thanks all guys , specially Vermaden , help me understand many thing about ZFS and FreeBSD,
 
@mfaridi

At last, gratz ;)

caesius said:
(...) output of
Code:
mount
shows that /NEWROOT/*** isn't mounted anywhere

In some place in HOWTO, these commands takes care of it:

Code:
fixit# [color="#0000ff"]mkdir /NEWROOT[/color]
fixit# [color="#0000ff"]mount /dev/label/rootfs /NEWROOT[/color]
fixit# [color="#0000ff"]zfs set mountpoint=/NEWROOT/usr basefs/usr[/color]
fixit# [color="#0000ff"]zfs set mountpoint=/NEWROOT/var basefs/var[/color]

After them you have these mounts:
Code:
#point       #device
/NEWROOT     ad0s1a
/NEWROOT/var basefs/var
/NEWROOT/usr basefs/usr

Then you install data sets, and after several things added later you do these:

Code:
fixit# [color="#0000ff"]zfs set mountpoint=/usr basefs/usr[/color]
fixit# [color="#0000ff"]zfs set mountpoint=/var basefs/var[/color]

... and reboot.
 
we use 512MB space for root and I think we can not make new kernel , if we want make new kernel , there is no space
 
root itself [if configured properly] takes very little space.
I have been using 512MB on root for a long time, when I was using GPT, it's enough space to install new kernel :)

current kernel takes less then 150MB
 
killasmurf86 said:
root itself [if configured properly] takes very little space.
I have been using 512MB on root for a long time, when I was using GPT, it's enough space to install new kernel :)

current kernel takes less then 150MB

I have another system and use FreeBSD 7.2 and use it for long time and I compile kernel and config it for PF , but know I run
Code:
df -h
I see this output
Code:
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ad10s1a    484M    437M    8.7M    98%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/ad10s1d    989M     14M    897M     1%    /tmp
/dev/ad10s1f    137G     95G     31G    75%    /usr
/dev/ad10s1e    1.9G    1.3G    458M    75%    /var
I can not delete old kernel for sometimes I need it if something is happen , and I see sometimes error about root is full
 
[cmd=]cd / && du -h -d 1[/cmd]
Code:
 37M	./kernel
 37M	./kernel.old

There is really no need for kernel directories to be bigger. Don't you have a lot of kernel.old directories lying around, all with huge debugging symbol files in there too?
 
DutchDaemon said:
[cmd=]cd / && du -h -d 1[/cmd]
Code:
 37M	./kernel
 37M	./kernel.old

There is really no need for kernel directories to be bigger. Don't you have a lot of kernel.old directories lying around, all with huge debugging symbol files in there too?

Is that kernel for server?
I bet you have tuned make.conf not to build many kernel modules. Am I right? Build only stuff that you really need
 
killasmurf86 said:
Is that kernel for server?
I bet you have tuned make.conf not to build many kernel modules. Am I right? Build only stuff that you really need

Stock 8.0-RELEASE i386 GENERIC kernel here:
Code:
bsd# [color="Blue"]ls /boot/kernel | wc -l[/color]
     610
bsd# [color="Blue"]du -sh /boot/kernel[/color]
 41M    kernel

You just need to remove the debuging symbols to save about 80-90MB:
# rm /boot/kernel/*.symbols
 
>Build only stuff that you really need

That's the Linux credo, but most practice usable with Linux isn't compatible with *BSD. People tend to tune every bit in an OS just to gain some 1-2% of performance/resources, but in the end most of them gain nothing at all or maybe some incompatibilities which they don't see at the beginning.

Many servers I know of, are using stock releases. Maybe tuned to avoid some incompatibility with a certain type of hardware. But there are no CPUTYPES in make.conf, no nonsense of 'KERNCONF on diet' etc. pp. If you _have to_ tune something, then see it as exception not permanent condition. Well, the opposite is Linux - you _have to_ tune it, to gain at least something barely usable (using some ready-to-go distro, is indeed a massive tuning approach).

That said, nice to see such a good tutorial. Thx Vermaden :)
 
vermaden said:
Stock 8.0-RELEASE i386 GENERIC kernel here:
Code:
bsd# [color="Blue"]ls /boot/kernel | wc -l[/color]
     610
bsd# [color="Blue"]du -sh /boot/kernel[/color]
 41M    kernel

You just need to remove the debuging symbols to save about 80-90MB:
# rm /boot/kernel/*.symbols

I run this
Code:
rm /boot/kernel/*.symbols
but when I run df -h I see this
Code:
/dev/ad10s1a    484M    268M    177M    60%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/ad10s1d    989M     14M    897M     1%    /tmp
/dev/ad10s1f    137G     98G     28G    78%    /usr
/dev/ad10s1e    1.9G    1.3G    462M    75%    /var
root use 268M
 
killasmurf86 said:
Is that kernel for server?
I bet you have tuned make.conf not to build many kernel modules. Am I right? Build only stuff that you really need

I'm building everything as far as modules goes. I have a stripped kernel. This was actually on my laptop. On one of my servers it's 35M - the kernel being 5.4M, the rest of the space taken by 612 modules. Like I said: it doesn't need to be much more than 35-40M at any time ;)
 
oliverh said:
That said, nice to see such a good tutorial. Thx Vermaden :)

Thanks mate ;)

One of the reasons to create own KERNCONF can be power saving (on laptops mostly). Move all hardware you would like to disable temporary to save power (with [cmd=]hw.pci.do_power_nodriver=3[/Cmd] in /boot/loader.conf). This way devices without attached driver would not consume power.

mfaridi said:
root use 268M

Code:
bsd# [color="Blue"]du -m -x -d 1 / | sort -n[/color]
0       /proc
1       /.snap
1       /dev
1       /libexec
1       /mnt
1       /root
1       /tmp
1       /usr
1       /var
2       /bin
2       /etc
5       /rescue
6       /sbin
7       /lib
44      /boot
64      /

bsd# [color="Blue"]du -sh /boot[/color]
 44M    /boot

bsd# [color="Blue"]df -h /[/color]
Filesystem           Size    Used   Avail Capacity  Mounted on
/dev/label/rootfs    496M     63M    393M    14%    /

The / filesystem does not only contain kernel ...

Check [Cmd=]du -m -x -d 1 / | sort -n[/Cmd] command on your box.
 
vermaden said:
Thanks mate ;)

One of the reasons to create own KERNCONF can be power saving (on laptops mostly). Move all hardware you would like to disable temporary to save power (with [cmd=]hw.pci.do_power_nodriver=3[/Cmd] in /boot/loader.conf). This way devices without attached driver would not consume power.



Code:
bsd# [color="Blue"]du -m -x -d 1 / | sort -n[/color]
0       /proc
1       /.snap
1       /dev
1       /libexec
1       /mnt
1       /root
1       /tmp
1       /usr
1       /var
2       /bin
2       /etc
5       /rescue
6       /sbin
7       /lib
44      /boot
64      /

bssd# [color="Blue"]du -sh /boot[/color]
 44M    /boot

bsd# [color="Blue"]df -h /[/color]
Filesystem           Size    Used   Avail Capacity  Mounted on
/dev/label/rootfs    496M     63M    393M    14%    /

The / filesystem does not only contain kernel ...

Check [Cmd=]du -m -x -d 1 / | sort -n[/Cmd] command on your box.

I run this command
Code:
du -m -x -d 1 / | sort -n
and output
Code:
/ # du -m -x -d 1 / | sort -n
1	/.snap
1	/cdrom
1	/dev
1	/dist
1	/libexec
1	/media
1	/mnt
1	/proc
1	/tmp
1	/usr
1	/var
2	/bin
2	/etc
5	/rescue
5	/sbin
6	/root
7	/lib
245	/boot
269	/
and run this command
Code:
du -sh /boot
and output
Code:
245M	/boot
 
Run the same command from within /boot and see what's eating up this space.
# du -m -x -d 1 /boot | sort -n
 
DutchDaemon said:
Run the same command from within /boot and see what's eating up this space.
# du -m -x -d 1 /boot | sort -n

I run this command
Code:
du -m -x -d 1 /boot | sort -n
and output
Code:
/ # du -m -x -d 1 /boot | sort -n
1	/boot/defaults
1	/boot/firmware
1	/boot/modules
1	/boot/zfs
38	/boot/kernel
207	/boot/kernel.old
245	/boot
/
Is this safe I delete old kernel . I think for recovery I need it
 
mfaridi said:
and run this command
Code:
du -sh /boot
and output
Code:
245M	/boot

... and you do not know what to do next?

Why I have this strange constant feeling that you do not know anything about UNIX ...

Show output of that command: # du -m -x -d 1 /boot | sort -n
 
Back
Top