Plan du KiWi
Si vous n'avez pas trouvé votre bonheur dans les liens plus haut, le plan vous montrera les quelques pages “cachées” de ce kiwi !
On this page we are gonna walk through all the steps needed to install a Debian Squeeze on your 5Big Network2 (should also work on any Kirkwood based product, that means every *Network2 product.)
sudo plum -i 192.168.0.5 -m 00:D0:4B:88:56:C8
Now, we are going to give U-Boot some command to boot the installer on our key. (Watch the second line, you must replace some parameters here.)
set mainlineLinux 2206; setenv bootargs netconsole=6666@NAS_IP/,6666@YOUR_IP/YOUR_MAC auto=true file=/preseed.cfg; usb reset; fatload usb 0:1 0x800000 uImage; usb stop bootm 0x800000
That's what it should look like :
% sudo plum -i 192.168.0.5 -m 00:D0:4B:88:56:C8 Please /!\HARD/!\ reboot the device /!\NOW/!\ Marvell>> set mainlineLinux 2206; Marvell>> setenv bootargs netconsole=6666@192.168.0.6/,6666@192.168.0.1/00:23:12:57:1c:70 auto=true file=/preseed.cfg; Marvell>> usb reset; (Re)start USB... USB: scanning bus for devices... 3 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found Marvell>> fatload usb 0:1 0x800000 uImage; ## Valid DOS partition found ## reading uImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4480440 bytes read Marvell>> usb stop; stopping USB.. Marvell>> bootm 0x800000; ## Booting image at 00800000 ... Image Name: Linux-2.6.36-0-kirkwood Created: 2010-09-12 20:32:12 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4480376 Bytes = 4 .3 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK Starting kernel ... [ 0.000000] Linux version 2.6.36-0-kirkwood (root@buildbot) (gcc version 4.4.2 (crosstool-NG-hg_default@1665_60a47ac6cae1) ) #6 PREEMPT Mon Mar 7 13:53:02 CET 2011 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177 [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine: LaCie 5Big Network v2 [ 0.000000] Ignoring unrecognised tag 0x41000403 [ 0.000000] Memory policy: ECC disabled, Data cache writeback [...]
Wait a few minutes, then connect to your product using SSH :
ssh installer@192.168.0.5
The password is “azerty” (without the double quotes)
So what now ? It's pretty straight forward if you have already installed a debian system before, otherwise, follow the screenshots.
Select YES here, the installer will complain a few times during the procedure, just ignore it.
The installer is downloading what it needs to install your system.
Create your root users with a strong password (not like mine on theses).
Well after that create your users and type your password. You don't need screenshot for that, read what the installer tells you.
Choose your language and country.
After that, the installer will detect your disks and install what it will need for the next step : The partitioning of your disks.
We are not going to explain how or why you should partition your disks. In our case (5Big Network2), we want our system to be installed on a RAID right ?
Let's do it :
First select “Manual” at the partition disks menu. You will have total control over your partition. I have the following scheme :
I build my system on a RAID 1, from this when a disk is down, I can always boot with the others before replacing the faulty disks.
Once your config is done, the installer will write your changes on your disks.
And begin the installation of the system.
When you see this :
Do not panic and hit continue. Then go with “Installing the base system” steps. Let the installer do its job installing the packets that were downloaded during the previous step.
You will this screen after a while :
Hit YES
When you see this screen :
Hit Go Back and then “execute a shell” remember the error from the installer ?
You don't have a kernel yet !
As said by the installer, it could not find any kernel for us but we need one, right ? So we must install one ourself.
We are going to create a chroot with our current install, this means that we will be logged in our fresh system with the kernel of the installer. This way, we will be able to install a kernel in our system.
Your install partition will be mounted in /target. Do a mount first and umount every point that is using your devices
Adapt theses command to your configuration.
mount /dev/md2 /target mount -o bind /proc /target/proc mount -o bind /dev /target/dev chroot /target /bin/bash
You should see this line :
root@cacao:/#
Now, we need to install the initramfs-tools so the installer will create the initrd file for us.
apt-get install initramfs-tools
Note : If Perl is whining about missing locales and prompt with a message like this :
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = "En_US", LANG = (unset) are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
you can fix it by exporting the correct locales :
export LC_CTYPE=en_US.UTF-8 export LC_ALL=en_US.UTF-8
You will now download and install your kernel.
wget http://kiwi.f00.fr/_media/5big/linux-image-2.6.36-0-kirkwood_2.6.36~maxime_armel.deb dpkg -i a.deb
Don't take any attention to any message like :
Hmm. There is a symbolic link /lib/modules/2.6.36-0-kirkwood/build However, I can not read it: No such file or directory Therefore, I am deleting /lib/modules/2.6.36-0-kirkwood/build
or
Hmm. The package shipped with a symbolic link /lib/modules/2.6.36-0-kirkwood/source However, I can not read the target: No such file or directory Therefore, I am deleting /lib/modules/2.6.36-0-kirkwood/source
If you have this message :
df: Warning: cannot read table of mounted file systems: No such file or directory
You can fix it by doing this :
grep -v rootfs /proc/mounts > /etc/mtab
If you have this message :
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
Well, just read the file mdadm told you too. To sum up, you must check that your mdadm.conf is correct. Once it's done just do that : (and please CHECK THE FILE !)
rm -f /var/lib/mdadm/CONF-UNCHECKED update-initramfs -u -k all
To boot the device after that, we are going to need a kernel and an initrd, it's a small filesytems stored in you RAM with a few binaries, it is used to make preparations before the boot. In our case : mount our RAID array !
In /boot, you will find 4 files :
-rw-r--r-- 1 root root 49729 Mar 7 13:52 config-2.6.36-0-kirkwood -rw-r--r-- 1 root root 2451731 Mar 18 19:30 initrd.img-2.6.36-0-kirkwood -rw-r--r-- 1 root root 1045308 Mar 7 13:53 System.map-2.6.36-0-kirkwood -rw-r--r-- 1 root root 2175548 Mar 7 13:53 uImage-2.6.36-0-kirkwood
Copy the inird on your key (be sure to mount it first, find it using “dmesg | grep sd*” ) :
cp initrd.img-2.6.36-0-kirkwood /mount/usb
Then copy uImage (kernel) on your key :
cp uImage-2.6.36-0-kirkwood /mount/usb/uImage2
Now you may exit your chroot and umount everything you mounted, reboot !
You have a few solutions :
I go with the USB Key because I find it easier to change my kernel as I pleased, I don't have to remove any disks or mount them elsewhere. But that's just me !
While your product is rebooting launch clunc or plum as we did it earlier on this tutorial. Enter theses commands :
setenv bootargs netconsole=6666@NAS_IP/,6666@MY_IP/MY_MAC initrd=0xe00000,0x400000 root=NAS_ROOT_PARTITION panic=30; usb reset; fatload usb 0:1 0x800000 uImage2; fatload usb 0:1 0xe00000 initrd; usb stop; bootm 0x800000;
Note : the kernel is called uImage2 as I kept the installer uImage on my key !
If it boots, then you're done. To boot with more ease in the future, you can set up a command by doing :
setenv usbcmd "setenv bootargs netconsole=6666@NAS_IP/,6666@MY_IP/MY_MAC initrd=0xe00000,0x400000 root=NAS_ROOT_PARTITION panic=30; usb reset; fatload usb 0:1 0x800000 uImage2; fatload usb 0:1 0xe00000 initrd; usb stop; bootm 0x800000;"
saveenv
Then you will only have to input “run usbcmd”, and your device will boot !