Succeed:
1) Window XP(Pentium4 2.6GHz) + VirtualBox 2.0.6 + Jinstall-9.0R1.10-domestic-signed.tgz
2) Ubuntu 8.04(Xeon 2.0GHz) + VirtualBox 2.0.6 + Jinstall-9.0R1.10-domestic-signed.tgz



Junos, the commercial operating system of Juniper router is based on FreeBSD operating system.
It means that Junos can be installed in public FreeBSD box.

The important thing is the version of Junos has different FreeBSD version. Before installation of FreeBSD, we have to find the matching of Junos and FreeBSD versions.

 Junos Version

 FreeBSD version

 < 5.0

 2.2.6

 5.0 <= Junos <= 7.2

 4.2

 7.3 < Junos < 8.5

 4.10

 >= 8.5

 6.1


I will install Jinstall-9.0R1.10-domestic-signed.tgz in my FreeBSD 6.1 box.

1. Installation of FreeBSD 6.1
In this phase, the most important part is the partitioning of hard disk.

ad0s1a    /          500M
ad0s1b    swap       1G
ad0s1e    /config    12M
ad0s1f          /var       large (like, the rest of the disk)

The /config partition must be ad0s1e, and /var partion must be /ad0s1f
,because each partion is used in installation phase and the partion layout may be hard-coded.

2. Hacking the jinstall source
  (e.x. assume file name is jinstall-9.0R1.10-domestic-signed.tgz)
 
Packaging Junos (Language : text)
  1.  
  2. #cd /var/tmp
  3. #mkdir jinst-signed
  4. #cd jinst-signed
  5. #tar zxvf ../jinstall-9.0R1.10-domestic-signed.tgz
  6.  
  7. #mkdir jinst
  8. #cd jinst
  9. #tar zxvf ../jinstall-9.0R1.10-domestic.tgz
  10.  
  11. #mkdir pkgtools
  12. #cd pkgtools
  13. #tar zxvf ../pkgtools.tgz
  14. #cd bin
  15. #cp /usr/bin/true ./checkpic
  16. #cd ..
  17.  
  18. #tar zcvf ../pkgtools.tgz *
  19. #cd ..
  20. #rm -rf pkgtools
  21.  
  22. #tar zcvf /var/tmp/jinstall-9.0R1.10-domestic-olive.tgz *
  23.  


3. Update environment

Environment setting (Language : text)
  1. #ln -s /dev/ad0c /dev/wd0c
  2. #mkdir /var/etc
  3. #touch /var/etc/master.passwd
  4. #touch /var/etc/inetd.conf
  5. #touch /var/etc/group




/etc/fstab (Language : text)
  1. /dev/ad0s1b /tmp mfs  rw,nodev,nosuid,-s=153600  0 0

4. Install Jinstall

Install Package (Language : text)
  1. #pkg_add -f ./Jinstall-9.0R1.10-domestic-olive.tgz

4.1 fix memory disk fail (In Linux Host & VirtualBox 2.0.4)
  (error in booting log like
      mfs: available = -12334)

Error log message (from Serial Port) (Language : text)
Disk to install is ad0
mfs: available=-34432
WARNING: want 160Mb for /tmp rather than -17629184b

VirtualBox 2.0.4 in Linux version has a bug for physical memory.
The bug is that the physical memory of guest OS does not change, even if you change it.
This can be seen by "sysctl -n hw.physmem" commond in FreeBSD.
So Junos has less memory for installation and halt.
The fix is explicitly say the size of physical memory like below:


/boot/loader.conf (Language : text)
hw.physmem="268369920"
This value is for 256M physical memory.

5. Setting serial connection
The preinstallation can be seen by Serial port not by terminal, so I have to connect serial port.

/etc/ttys (Language : text)
  1. ttyd0 "/usr/libexec/getty std.9600" dialup on secure

6. reboot system


사용자 삽입 이미지




 

티스토리 툴바