준비할 것들이 많다.
우선 /etc/make.conf 파일에 다음 한줄을 추가해서 make 작업전에 버전체크!
ALWAYS_CHECK_MAKE=true
그리고 make.conf 파일에서 다음과 같이 수정
NOGAMES -> NO_GAMES 로 수정,
NOPROFILE -> NO_PROFILE 로 수정
그래야 make 할때마다 발생하는 warning 에러 메세지를 잡을 수 있다.
"/usr/src/share/mk/bsd.compat.mk", line 36: warning: NOGAMES is deprecated in favor of NO_GAMES
"/usr/src/share/mk/bsd.compat.mk", line 36: warning: NOPROFILE is deprecated in favor of NO_PROFILE
그리고 아래의 명령으로 buildworld 하고 남은 찌꺼기를 전부 삭제한다.
chflags -R noschg /usr/obj/usr/
rm -rf /usr/obj/usr/
cd /usr/src
make cleanworld
make cleandir && make cleandir
이제 make update 까지 다 끝났고 GENERIC커널을 BABY 복사하여 수정후
make buildworld
make buildkernel KERNCONF=BABY
make installkernel
mergemaster -p
reboot
make installworld
mergemaster
fastboot
과정으로 업그레이드를 마치는것이 계획이다.
아참 port의 경우에도 /usr/ports/UPDATING 파일을 읽는것을 잊지말자!
Good luck~*
부팅시 문제가 되는 부분은 크게 2가지 였다.
/etc/fstab 에 linprocfs 가 들어있는데 이게 실패하면서 싱글모드로 drop
또 /etc/fstab 에 RAID 장치를 mount 하는데 이게 실패하면서 싱글로 drop
RAID문제는 아래 포스트 처럼 /usr/local/etc/rc.d/raid.sh 파일을 만들어서
해결했는데 실상은 커널 config에다가 device ataraid 안넣어줘서 생긴 에러다.
linprocfs문제는 어이없게도, 설정상의 문제였다 (설정 방법이 바뀌었다)
기존에는 linux_enable="YES" 를 /etc/rc.conf 에 두어야 했었는데, 이게 바뀌었다.
/boot/loader.conf 에다가 다음 두줄을 작성해준다.
linux_load="YES"
linprocfs_load="YES"
이후 make installkernel 한뒤에 리붓후 ln /bin/test /bin/[ 하고나서
make installworld 를 실시하여 모든 업그레이드를 마무리 짓고 리붓하였다.
속이 다 시원하고 후련하당~ ;)
아울러 내친구 구글에게 무한한 감사의 말씀 드린다... 대세는 구글링!
baby# uname -a
FreeBSD baby.clanbh.net 5.4-RELEASE-p16 FreeBSD 5.4-RELEASE-p16 #2: Mon Jul 24 18:54:45 KST 2006 diest@baby.clanbh.net:/usr/obj/usr/src/sys/BABY i386
현재까지 발생한 문제점 LIST-UP
/etc/fstab 에서 linprocfs 구문을 삭제 하지 않으면 오류로 싱글로 빠짐
linprocfs: No such file or directory
또는
can't load linprocfs: File exists
/etc/rc.conf 에서 linx_enable="YES" 를 했을경우 부팅시 아래와 같은 에러발생
Initial i386 initialization:.
Additional ABI support: linuxELF binary type "3" not known.
/compat/linux/sbin/ldconfig: 1: Syntax error: "(" unexpected
부팅때 ar0s1d RAID장치를 /etc/fstab 에서 마운트 하지 않고
/usr/local/etc/rc.d/raid.sh 에서 부팅후 마운트해야 혹시 모를 오류발생시 싱글로 떨어지지 않는다
baby:/usr/local/etc/rc.d# cat raid.sh
#!/bin/sh
MOUNT="/sbin/mount -t ufs -o rw /dev/ar0s1d /ftp/RAID"
UMOUNT="/sbin/umount /ftp/RAID"
case "$1" in
start)
echo "Mount starting RAID: "
$MOUNT; sleep 2; $MOUNT
;;
stop)
echo "_RAID_: "
$UMOUNT
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
#
부팅때 Recovering vi editor sessions:Segmentation fault 에러
Recovering vi editor sessions:Segmentation fault
dmesg 에서 pid ??? (sendmail), uid 25: exited on signal 11 에러
pid ??? (sendmail), uid 25: exited on signal 11
make update (또는 cvsup -g -L 2 /cvsup/stable-supfile)
mergemaster -p
make buildworld
make buildkernel KERNCONF=BABY (커널옵션에 ataraid는 꼭 포함시키자)
make installkernel KERNCONF=BABY
reboot
ln /bin/test /bin/[ (요 한줄덕에 반년을 허비했다! 라기보다는 엉뚱한 구글링을... ㅠ_ㅜ)
make installworld
mergemaster
reboot
이걸로 반년넘게 나를 골탕먹였던 5.4-STABLE 작전은 마무리 된다.
시간을 내서 구글링만 잘 했어도 나는 반년이란 시간을 허비하지 않았을 것이다.
알면 알수록 조금 더 FreeBSD를 알고 싶어지는 악마와도 같은 이끌림...
정말 FreeBSD는 나를 미치게 한다 ^^
To upgrade in-place from 4.x-stable to current
----------------------------------------------
# 5.x uses more space than 4.x. Also, the location of kernel
# modules has changed. If you are installing 5.0 onto a 4.x
# system, you'll need about 30MB of free disk space on your /
# partition. If you have less than this, you may encounter difficult
# to back out of problems with this procedure. If /tmp is on
# the / partition, you may want to completely remove all its content
# before upgrading, as this can be a common source of shortage of
# space on /.
[7]
make buildworld [9]
make buildkernel KERNCONF=YOUR_KERNEL_HERE [8]
cp sys/${MACHINE}/conf/GENERIC.hints /boot/device.hints [2]
make installkernel KERNCONF=YOUR_KERNEL_HERE
cd sys/boot ; make STRIP="" install [6]
[1]
[3]
/usr/src/etc/rc.d/preseedrandom [10]
mergemaster -p [5]
rm -rf /usr/include/g++
make installworld
mergemaster -i [4]
Make sure that you've read the UPDATING file to understand the
tweaks to various things you need. At this point in the life
cycle of current, things change often and you are on your own
to cope. The defaults can also change, so please read ALL of
the UPDATING entries.
cd /usr/src/sys/compile/MYKERNEL
make depend all modules install
make buildkernel/installkernel (make kernel KERNEL=MYKERNEL ..)은
소스트리를 업데잇후 buildworld 했을때에만 필요합니다.
/usr/sup/refuse 파일을 만들어서 아래 리스트를 추가하면 된다.
ports/chinese
ports/french
ports/german
ports/hebrew
ports/hungarian
ports/japanese
ports/polish
ports/portuguese
ports/russian
ports/ukrainian
ports/vietnamese
doc/da_*
doc/de_*
doc/el_*
doc/es_*
doc/fr_*
doc/it_*
doc/ja_*
doc/nl_*
doc/no_*
doc/pl_*
doc/pt_*
doc/ru_*
doc/sr_*
doc/zh_*
여러번 시도중의 첫번째 기록...
cvsup 한뒤 make buildworld; make buildkernel 한 뒤
mergemaster -p 하고나서
make installkernel 을 실행했다.
이제 UPDATING 문서를 참조하여 손을 좀 본뒤
Migration 문서대로 따라서 마저 업그레이드 작업을 마무리 지어봐야겠다.
과연, 한방에 성공할까?
루트 권한이 필요한 작업때문에 그러신다면 포트의 security/sudo를 추천합니다. 일반사용자 아이디로 루트 작업을 해야할때 매번 su - 할 필요 없이 실행명령 앞에 sudo라고 치면 됩니다. 예를 들어 /etc/rc.conf를 바꾼다면,
라고 하시면 됩니다. 물론 sudoer 이라는 설정파일에 등록된 사용자에 한해서 말이지요.
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 5.1-RELEASE-p17 #0: Wed Jun 9 01:07:25 GMT 2004
airif@baby.clanbh.net:/usr/src/sys/i386/compile/BABY_B02
Preloaded elf kernel "/boot/kernel/kernel" at 0xc06d9000.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc06d9244.
Timecounter "i8254" frequency 1193182 Hz
Timecounter "TSC" frequency 1533398704 Hz
CPU: AMD Athlon(tm) XP 1800+ (1533.40-MHz 686-class CPU)
Origin = "AuthenticAMD" Id = 0x681 Stepping = 1
Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXS R,SSE>
AMD Features=0xc0400000<AMIE,DSP,3DNow!>
real memory = 536805376 (511 MB)
avail memory = 513994752 (490 MB)
Pentium Pro MTRR support enabled
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <AMIINT VIA_K7 > on motherboard
pcibios: BIOS version 2.10
Using $PIR table, 14 entries at 0xc00f8030
acpi0: power button is handled as a fixed feature programming model.
Timecounter "ACPI-fast" frequency 3579545 Hz
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_cpu0: <CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA Generic host to PCI bridge> mem 0xe0000000-0xe7ffffff at device 0.0 on pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
bge0: <Altima AC9100 Gigabit Ethernet, ASIC rev. 0x105> mem 0xdffe0000-0xdffeffff irq 10 at device 7 .0 on pci0
bge0: Ethernet address: 00:07:40:4c:ae:c3
miibus0: <MII bus> on bge0
brgphy0: <BCM5701 10/100/1000baseTX PHY> on miibus0
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto
atapci0: <Promise PDC20376 SATA150 controller> port 0xe400-0xe47f,0xe800-0xe80f,0xec00-0xec3f mem 0x dffc0000-0xdffdffff,0xdffff000-0xdfffffff irq 10 at device 13.0 on pci0
ata2: at 0xdffff000 on atapci0
ata3: at 0xdffff000 on atapci0
ata4: at 0xdffff000 on atapci0
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
atapci1: <VIA 8235 UDMA133 controller> port 0xfc00-0xfc0f at device 17.1 on pci0
ata0: at 0x1f0 irq 14 on atapci1
ata1: at 0x170 irq 15 on atapci1
acpi_button1: <Sleep Button> on acpi0
fdc0: cmd 3 failed at out byte 1 of 3
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
fdc0: cmd 3 failed at out byte 1 of 3
orm0: <Option ROMs> at iomem 0xcd000-0xd4fff,0xc0000-0xccfff on isa0
pmtimer0 on isa0
fdc0: cannot reserve I/O port range (6 ports)
ppc0: parallel port not found.
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 8250 or not responding
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 10.000 msec
ipfw2 initialized, divert disabled, rule-based forwarding enabled, default to accept, logging limite d to 100 packets/entry by default
acpi_cpu: throttling enabled, 16 steps (100% to 6.2%), currently 100.0%
ad0: 76319MB <ST380011A> [155061/16/63] at ata0-master UDMA100
ad1: 76319MB <WDC WD800BB-00CAA1> [155061/16/63] at ata0-slave UDMA100
ad4: 76319MB <ST380013AS> [155061/16/63] at ata2-master UDMA133
ad6: 76319MB <ST380013AS> [155061/16/63] at ata3-master UDMA133
ata1-slave: timeout waiting for cmd=ef s=00 e=25
acd0: CDROM <GCD-R540C> at ata1-slave BIOSPIO
ar0: 152638MB <ATA RAID0 array> [19458/255/63] status: READY subdisks:
disk0 READY on ad4 at ata2-master
disk1 READY on ad6 at ata3-master
Opened disk ad4 -> 1
Opened disk ad4 -> 1
Opened disk ad6 -> 1
Opened disk ad6 -> 1
Mounting root from ufs:/dev/ad0s1a
WARNING: / was not properly dismounted
WARNING: /usr was not properly dismounted
WARNING: /var was not properly dismounted
WARNING: /usr/home/glftpd/glftpd/site/ATA was not properly dismounted
WARNING: /usr/home/glftpd/glftpd/site/RAID was not properly dismounted