Difference between revisions of "Installing Sylver's Image on a new Kuro"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m (Installing Slyver's Image on a new Kuro moved to Installing Sylver's Image on a new Kuro)
(Untar the image and kernel tar file)
 
(12 intermediate revisions by 9 users not shown)
Line 1: Line 1:
I thought that I would right up a little how-to that contains all of the information that I used to get Sylver's image running and update the kernel to 2.6.15. I've taken from other guides posted on the wiki and other threads on this BB to create one comprehensive guide.  
+
<p style="border:dashed 1px red;background:Lemonchiffon;text-align:center;margin:0 5px">
 
+
'''Backup ANY data, because during the installation all partitions will be deleted and your DATA WILL BE LOST.
This process assumes that you have the KuroBox? in "EM" mode and that you have used "telnet" to connect to the box.  
+
'''<br>Use this guide at your own risk!
 +
</p>
 +
 
 +
This is a little how-to that contains all of the information you need to get Sylver's image running and the kernel updated to 2.6.15.  
 +
 
 +
The information found here was taken from various other internet sources and posted here to create one comprehensive guide.  
 +
 
 +
==Put the KuroBox into EM mode==
 +
[[EM Mode|Emergency Maintenance Mode]] (EM mode) is indicated by this login prompt:
 +
kernel 2.4.17-kuro-box on ppc
 +
KURO-BOX-EM login:
 +
or by a shell prompt that contains the -EM, such as:
 +
KURO-BOX-EM ~ #
 +
 
 +
If your KuroBox is not in EM mode, you must switch it to EM mode.
 +
These are the only known ways to enter EM mode:
 +
* Boot with an IDE disk that contains no Linux partitions.
 +
* Boot with the "bad disk image" flag set in the Flash ROM.
 +
 
 +
If you are using the standard image and you already have root user shell access to the KuroBox, you can change the "bad disk image" flag to switch it to EM mode:
 +
# echo "NGNGNGNG" > /dev/fl3
 +
# reboot
 +
 
 +
(Make sure you type FL3 and not F13 in lower case). 
 +
After the reboot, log in as the root user and verify that you are running in EM mode.
 +
 
 +
'''Do not reboot again until the image and the kernel are installed!'''
 +
 
 
==Run mfdisk in interactive mode  ==
 
==Run mfdisk in interactive mode  ==
 
  mfdisk -c /dev/hda  
 
  mfdisk -c /dev/hda  
==Create partition 1 ("/") as 2-10 GB ==
 
  
To use Sylver's image you need at least 2 GB. The extracted the tar file takes about 1.2GB. The tar is about 350K. I used 4 GB  
+
==Create partition 1 ("/") as 2-10 GB==
 +
 
 +
To use Sylver's image you need at least 2 GB. The extracted tar file takes about 1.2 GB. The tar itself is about 350 KB. This example creates a 4 GB partition 1.
 
  Command (m for help): n  
 
  Command (m for help): n  
 
  Command action  
 
  Command action  
Line 13: Line 41:
 
  p  
 
  p  
 
  Partition number (1-4): 1  
 
  Partition number (1-4): 1  
  First cylinder (1-48641, default 1):  
+
  First cylinder (1-xxxxx, default 1):
 
  Using default value 1  
 
  Using default value 1  
  Last cylinder or +size or +sizeM or +sizeK (1-48641, default 48641): +4096M  
+
  Last cylinder or +size or +sizeM or +sizeK (1-xxxxx, default xxxxx): +4096M  
 +
 
 
==Create partition 2 (swap) as 512 MB==
 
==Create partition 2 (swap) as 512 MB==
 
  Command (m for help): n  
 
  Command (m for help): n  
Line 23: Line 52:
 
  p  
 
  p  
 
  Partition number (1-4): 2  
 
  Partition number (1-4): 2  
  First cylinder (132-48641, default 132):  
+
  First cylinder (132-xxxxx, default 132):  
 
  Using default value 132  
 
  Using default value 132  
  Last cylinder or +size or +sizeM or +sizeK (132-48641, default 48641): +512M  
+
  Last cylinder or +size or +sizeM or +sizeK (132-xxxxx, default xxxxx): +512M  
 
Set the System ID of the swap partition (partition 2) to "Linux Swap"
 
Set the System ID of the swap partition (partition 2) to "Linux Swap"
 
  Command (m for help): t  
 
  Command (m for help): t  
Line 31: Line 60:
 
  Hex code (type L to list codes): 82  
 
  Hex code (type L to list codes): 82  
 
  Changed system type of partition 2 to 82 (Linux swap)  
 
  Changed system type of partition 2 to 82 (Linux swap)  
 +
 
==Create partition 3 ("/mnt")==
 
==Create partition 3 ("/mnt")==
Create partition 3 ("/mnt") as the remainder of the disk. Use the default, which will very depending on your disk size
+
Create partition 3 ("/mnt") as the remainder of the disk. Use the default cylinder values.
 
  Command (m for help): n  
 
  Command (m for help): n  
 
  Command action  
 
  Command action  
Line 39: Line 69:
 
  p  
 
  p  
 
  Partition number (1-4): 3  
 
  Partition number (1-4): 3  
  First cylinder (198-48641, default 198):  
+
  First cylinder (198-xxxxx, default 198):  
 
  Using default value 198  
 
  Using default value 198  
  Last cylinder or +size or +sizeM or +sizeK (198-48641, default 48641):  
+
  Last cylinder or +size or +sizeM or +sizeK (198-xxxxx, default xxxxx):  
  Using default value 48641
+
  Using default value xxxxx
 
==Write the new partition table and exit  ==
 
==Write the new partition table and exit  ==
 
  Command (m for help): w
 
  Command (m for help): w
Line 48: Line 78:
 
  The partition table has been altered!  
 
  The partition table has been altered!  
 
   
 
   
  Syncing disks.
+
  Syncing disks.
==Fromat the partitions==
+
 
Now that you have created and saved the partitions, ie fdisk, you need to use the mkfs to format each partition  
+
==Format the partitions==
 +
Now that you have created and saved the partitions using fdisk, you need to use mkfs to format each partition. (mkfs normally reserves 5% of the blocks for superuser-use only, which can be a lot when using big disks. We tell mkfs to reserve only 1% for the superuser on the third partition by using the "-m 1" switch").
 
  mkfs -j /dev/hda1  
 
  mkfs -j /dev/hda1  
  mkfs -j /dev/hda3  
+
  mkfs -j -m 1 /dev/hda3  
  mkswap /dev/hda2  
+
  mkswap /dev/hda2
 +
 
 
==Mount the Partitions==
 
==Mount the Partitions==
Now that you have formated each partition, you need to make it available by mounting it  
+
Now that you have formatted each partition, you need to make the root partition available by mounting it  
  mount /dev/hda1 /mnt  
+
  mount /dev/hda1 /mnt
You might ask yourself, as I did, why mount hda1 as mnt? What about hda3? Don't I have to mount that too? Well that magic happens when you leave EM mode.. /mnt becomes / and hda3 becomes /mnt, cool huh?  
+
You might ask yourself, as I did, why mount hda1 as mnt? What about hda3? Don't I have to mount that too? Well that magic happens when you leave EM mode.. /mnt becomes / and hda3 becomes /mnt, cool huh?
Download the image @  
+
 +
Download the V5.00 image files @ http://kuroboxhg.free.fr/files/sylver_image/
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part1.rar imagev500.part1.rar]  
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part1.rar imagev500.part1.rar]  
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part2.rar imagev500.part2.rar]  
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part2.rar imagev500.part2.rar]  
Line 67: Line 100:
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part7.rar imagev500.part7.rar]  
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part7.rar imagev500.part7.rar]  
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part8.rar imagev500.part8.rar]
 
  [http://kuroboxhg.free.fr/files/sylver_image/imagev500.part8.rar imagev500.part8.rar]
Download the kernel @ http://www.kurobox.com/sylver/image/patch/kernel2.6.15.6.tar.gz  
+
Download the kernel @ http://www.kurobox.com/sylver/image/patch/kernel2.6.15.6.tar.gz
I used winrar to merge the rar files into one tar file imagev500.tar.gz. Next ftp the image and kernel tar file to /mnt
+
 +
I used winrar to merge the rar files into one tar file imagev500.tar.gz.  
 +
Next ftp the image and kernel tar file to /mnt
  
 
==Untar the image and kernel tar file ==
 
==Untar the image and kernel tar file ==
Line 75: Line 110:
 
  tar xvfz kernel2.6.15.6.tar.gz  
 
  tar xvfz kernel2.6.15.6.tar.gz  
 
Remove both tar files to save space.  
 
Remove both tar files to save space.  
 +
 +
The default IP number is 192.168.0.100.
 +
 
Now that the package is extracted lets set everything so we can leave EM mode  
 
Now that the package is extracted lets set everything so we can leave EM mode  
 
  write_ok  
 
  write_ok  
Line 80: Line 118:
 
  reboot  
 
  reboot  
 
When your Kuro reboots you should notice that it is no longer in EM mode. Also you should also see your filesystems changed up like I mentioned earlier   
 
When your Kuro reboots you should notice that it is no longer in EM mode. Also you should also see your filesystems changed up like I mentioned earlier   
  [root@KURO-BOX:/]$\ df -h  
+
  [root@KURO-BOX:/]$ df -h  
 
  Filesystem Size Used Avail Use% Mounted on  
 
  Filesystem Size Used Avail Use% Mounted on  
 
  /dev/hda1 4.0G 1.2G 2.7G 31% /  
 
  /dev/hda1 4.0G 1.2G 2.7G 31% /  
  /dev/hda3 183G 33M 174G 1% /mnt  
+
  /dev/hda3 183G 33M 174G 1% /mnt
 +
 
 
==Update the kernel. Sylver made this very easy to do ==
 
==Update the kernel. Sylver made this very easy to do ==
cd to /etc/init.d vi bootnewos file
+
Update the bootnewos script
 
  cd /etc/init.d  
 
  cd /etc/init.d  
 
  vi bootnewos  
 
  vi bootnewos  
This will open up a vi text editor. Check the last line:  
+
This will open up a vi text editor. Check the last line:  
 
  # bootnewos.sh Boots OS if needed.  
 
  # bootnewos.sh Boots OS if needed.  
 
  #  
 
  #  
Line 106: Line 145:
 
  /sbin/insmod /boot/loader.o kernel=/boot/vmlinux-2.6.15-kurobox  
 
  /sbin/insmod /boot/loader.o kernel=/boot/vmlinux-2.6.15-kurobox  
 
  fi  
 
  fi  
Change kernel=/boot/vmlinux-2.6.15-kurobox to  
+
Change the kernel=/boot/vmlinux-2.6.15-kurobox to:
  kernel=/boot/vmlinux-2.6.15.6-kuroboxhg if you have a HG Kuro or to
+
 
  kernel=/boot/vmlinux-2.6.15.6-kurobox if you have a non-HG
+
If you have a Kurobox HG,
 +
  kernel=/boot/vmlinux-2.6.15.6-kuroboxhg  
 +
If you have a non-HG Kurobox,
 +
  kernel=/boot/vmlinux-2.6.15.6-kurobox  
 
Save the file and cd to /scripts  
 
Save the file and cd to /scripts  
 
  cd /scripts  
 
  cd /scripts  
Line 119: Line 161:
 
  Linux/ppc 2.6.15.6-kuroboxhg   
 
  Linux/ppc 2.6.15.6-kuroboxhg   
 
Success
 
Success
 +
 +
[[Category:Sylver]]

Latest revision as of 09:16, 13 August 2010

Backup ANY data, because during the installation all partitions will be deleted and your DATA WILL BE LOST.
Use this guide at your own risk!

This is a little how-to that contains all of the information you need to get Sylver's image running and the kernel updated to 2.6.15.

The information found here was taken from various other internet sources and posted here to create one comprehensive guide.

Contents

Put the KuroBox into EM mode

Emergency Maintenance Mode (EM mode) is indicated by this login prompt:

kernel 2.4.17-kuro-box on ppc 
KURO-BOX-EM login: 

or by a shell prompt that contains the -EM, such as:

KURO-BOX-EM ~ # 

If your KuroBox is not in EM mode, you must switch it to EM mode. These are the only known ways to enter EM mode:

  • Boot with an IDE disk that contains no Linux partitions.
  • Boot with the "bad disk image" flag set in the Flash ROM.

If you are using the standard image and you already have root user shell access to the KuroBox, you can change the "bad disk image" flag to switch it to EM mode:

# echo "NGNGNGNG" > /dev/fl3
# reboot

(Make sure you type FL3 and not F13 in lower case). After the reboot, log in as the root user and verify that you are running in EM mode.

Do not reboot again until the image and the kernel are installed!

Run mfdisk in interactive mode

mfdisk -c /dev/hda 

Create partition 1 ("/") as 2-10 GB

To use Sylver's image you need at least 2 GB. The extracted tar file takes about 1.2 GB. The tar itself is about 350 KB. This example creates a 4 GB partition 1.

Command (m for help): n 
Command action 
e extended 
p primary partition (1-4) 
p 
Partition number (1-4): 1 
First cylinder (1-xxxxx, default 1):
Using default value 1 
Last cylinder or +size or +sizeM or +sizeK (1-xxxxx, default xxxxx): +4096M 

Create partition 2 (swap) as 512 MB

Command (m for help): n 
Command action 
e extended 
p primary partition (1-4) 
p 
Partition number (1-4): 2 
First cylinder (132-xxxxx, default 132): 
Using default value 132 
Last cylinder or +size or +sizeM or +sizeK (132-xxxxx, default xxxxx): +512M 

Set the System ID of the swap partition (partition 2) to "Linux Swap"

Command (m for help): t 
Partition number (1-4): 2 
Hex code (type L to list codes): 82 
Changed system type of partition 2 to 82 (Linux swap) 

Create partition 3 ("/mnt")

Create partition 3 ("/mnt") as the remainder of the disk. Use the default cylinder values.

Command (m for help): n 
Command action 
e extended 
p primary partition (1-4) 
p 
Partition number (1-4): 3 
First cylinder (198-xxxxx, default 198): 
Using default value 198 
Last cylinder or +size or +sizeM or +sizeK (198-xxxxx, default xxxxx): 
Using default value xxxxx 

Write the new partition table and exit

Command (m for help): w

The partition table has been altered! 

Syncing disks.
 

Format the partitions

Now that you have created and saved the partitions using fdisk, you need to use mkfs to format each partition. (mkfs normally reserves 5% of the blocks for superuser-use only, which can be a lot when using big disks. We tell mkfs to reserve only 1% for the superuser on the third partition by using the "-m 1" switch").

mkfs -j /dev/hda1 
mkfs -j -m 1 /dev/hda3 
mkswap /dev/hda2

Mount the Partitions

Now that you have formatted each partition, you need to make the root partition available by mounting it

mount /dev/hda1 /mnt

You might ask yourself, as I did, why mount hda1 as mnt? What about hda3? Don't I have to mount that too? Well that magic happens when you leave EM mode.. /mnt becomes / and hda3 becomes /mnt, cool huh?

Download the V5.00 image files @ http://kuroboxhg.free.fr/files/sylver_image/

imagev500.part1.rar 
imagev500.part2.rar 
imagev500.part3.rar 
imagev500.part4.rar 
imagev500.part5.rar 
imagev500.part6.rar 
imagev500.part7.rar 
imagev500.part8.rar

Download the kernel @ http://www.kurobox.com/sylver/image/patch/kernel2.6.15.6.tar.gz

I used winrar to merge the rar files into one tar file imagev500.tar.gz. Next ftp the image and kernel tar file to /mnt

Untar the image and kernel tar file

cd /mnt 
tar xvfz imagev500.tar.gz 
tar xvfz kernel2.6.15.6.tar.gz 

Remove both tar files to save space.

The default IP number is 192.168.0.100.

Now that the package is extracted lets set everything so we can leave EM mode

write_ok 

reboot 

When your Kuro reboots you should notice that it is no longer in EM mode. Also you should also see your filesystems changed up like I mentioned earlier

[root@KURO-BOX:/]$ df -h 
Filesystem Size Used Avail Use% Mounted on 
/dev/hda1 4.0G 1.2G 2.7G 31% / 
/dev/hda3 183G 33M 174G 1% /mnt

Update the kernel. Sylver made this very easy to do

Update the bootnewos script

cd /etc/init.d 
vi bootnewos 

This will open up a vi text editor. Check the last line:

# bootnewos.sh Boots OS if needed. 
# 

. /etc/kernel 

# detect current kernel 
BOOT_NEW_OS=`uname -r | grep ${KERNEL_TO_LOAD}` 

if [ "${BOOT_NEW_OS}" ] ; then 
echo kernel $KERNEL_TO_LOAD already loaded ! 
else 
echo loading kernel $KERNEL_TO_LOAD 
/bin/sync 
/bin/sleep 1 
/bin/sync 
/sbin/insmod /boot/loader.o kernel=/boot/vmlinux-2.6.15-kurobox 
fi 

Change the kernel=/boot/vmlinux-2.6.15-kurobox to:

If you have a Kurobox HG,

kernel=/boot/vmlinux-2.6.15.6-kuroboxhg 

If you have a non-HG Kurobox,

kernel=/boot/vmlinux-2.6.15.6-kurobox 

Save the file and cd to /scripts

cd /scripts 

Now run set_kernel2.6.sh with the install parameter and reboot

./set_kernel2.6.sh install 

reboot 

When your Kuro restarts check the top of the screen when you telnet in

Kuroutoshikou KURO-BOX/HG (IESHIGE) 
Linux/ppc 2.6.15.6-kuroboxhg  

Success