[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PA-RISC/Linux Boot HOWTO: 2.4 -> 2.6


	I'm sure you're way beyond my rough scrawl, but I found one small baby step
that I left out (8.3 c) and I want to make sure that whatever goes out is
complete to the lowest level of detail.


8. Upgrading from a Debian hppa 2.4 Kernel to a 2.6 kernel

8.1 Check your 2.4 partition scheme
8.2 First Steps
8.3 Set up f0 as /boot if necessary
8.4 Edit /etc/palo.conf
8.5 Before you reboot
8.6 Conclusion

8.1 Check your 2.4 partition scheme

It is relatively easy to set up a partition scheme that will "work" for a while, but 
then stop working when root starts to fill up. For example:

> palo ipl 1.5 root@c3k Tue Sep 21 15:14:05 MDT 2004
> Partition Start(MB) End(MB) Id Type
> 1               1      31   f0 Palo
> 2              32    1008   82 swap
> 3            1009   17366   83 ext2  root

Don't despair. There is a way to tell palo to format your f0 partition, copy 
everything from /boot over too it and the modify fstab to make the f0 partition 
mount as /boot (See 8.3). Here's an example that works:

Disk /dev/sda: 73.4 GB, 73407865856 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot   Start      End      Blocks   Id  System
/dev/sda1   *        1       24      192748+  f0  Linux/PA-RISC boot
/dev/sda2           25      148      996030   82  Linux swap
/dev/sda3          149     2140    16000740   83  Linux
/dev/sda4         2141     8924    54492480   83  Linux

and here's the palo.conf that goes with it:

--commandline=0/vmlinux-2.6.11-rc2-pa3-UP root=/dev/sda3 panic=5 console=ttyS1

8.2 First steps

I'm the conservative type, so I don't load from "unstable". At the time of this 
writing, the 2.6 kernels in "testing" are 2.6.8-2-32, 2.6.8-2-32-smp, 2.6.8-2-64 
and 2.6.8-2-64-smp.

Step 1 For example, apt-get install kernel-image-2.6.8-2-32-smp. When you get near 
the end of the install, you will get messages telling you that this is an initrd 
kernel and asking you if you want to abort. At this point say, "Yes". Now it's time 

Step 2  you need to add "sym53c8xx" to /etc/mkinitrd/modules. "modules" is created 
from /etc/mkinitrd/modules.dpkg-new.

This is how it looks after editing:

% cat /etc/mkinitrd/modules.dpkg-new
# /etc/mkinitrd/modules: Kernel modules to load for initrd.
# This file should contain the names of kernel modules and their arguments
# (if any) that are needed to mount the root file system, one per line.
# Comments begin with a `#', and everything on the line after them are ignored.
# You must run mkinitrd(8) to effect this change.
# Examples:
#  ext2
#  wd io=0x300


Okay. Now we are ready for:

Step 3 apt-get install kernel-image-2.6.8-2-32-smp again, but this time when asked 
if you want to abort, say, "No".

Step 4 Run apt-get upgrade

Step 5 Run palo -? and make sure your palo has -format-as=type

8.3 Set up f0 as /boot if necessary

One of the weaknesses of the current hppa installer is that it won't let you mount 
the f0 partition as /boot. If you created a small (50MB-200MB) ext2 partition and 
mounted it as /boot during the install process, you can skip this section and go to 
8.4. If not, and you have a / that goes out beyond 2GB from the beginning of your 
disk, here is your salvation. Of course, if you're starting from scratch, you can 
set up an f0 and an ext2 partition that you mount as /boot, but the preferred 
partitioning scheme is to just set up one f0 partition during installation (at 
least 50MB for a production system and say 200MB for a development system) and then 
use palo to format it, copy everything from /boot over too it and the modify fstab 
to make the f0 partition mount as /boot. Here's what to do:

a. Edit /etc/palo.conf, on the --commandline change your pointer to vmlinux to 
1/vmlinux and insert initrd=1/initrd.img.
     Add a line that says --format-as=2
     Leave the line that says --init-partitioned=/dev/sda (or similar)
     Remove the line that says --recoverykernel=/boot/vmlinux.old (or similar)
b. Now run palo. This will format your f0 partition.
c. cd /
d. Assuming your f0 partition is on sda1, mount /dev/sda1 mnt
e. cp /boot/* /mnt
f. edit /etc/fstab so that /dev/sda1 is mounted as /boot by adding this line:
# <file system> <mount point>   <type>  <options>            <dump>  <pass>
/dev/sda1       /boot           ext2    defaults               0       2
g. Edit /etc/palo.conf and remove the --format-as=2 line and change the 
--init-partitioned=/dev/sda to --update-partitioned=dev/sda.
h. Now run palo.
i. Reboot. If this fails, look at 8.4, go back over the steps above and try again. 
If it works,
j. Run /etc/init.d/klogd stop  (if you don?t stop klogd, you?ll get ?device is busy? 
when you try to umount /boot in the next step) 
k. umount /boot
l. rm /boot/*
m. mount /boot

If you get through step m., you're done.

8.4 Edit /etc/palo.conf

Edit /etc/palo.conf and insert on the --commandline initrd=x/boot/initrd.img where 
x is the number of the disk partition where /boot lives. Here's an example of a 
palo.conf that works:

--commandline=2/boot/vmlinux initrd=2/boot/initrd.img HOME=/ root=/dev/sda4

Then run palo!

8.4 Before you reboot

On some machines installing the 2.6 kernel flips the names of your hard drives 
(if you have more than one). For example, sda might become sdb with sbd becoming 
sda. If this happens, you will get an error on reboot that you can fix by going 
into ipl and changing, for example root=/dev/sda3 to root=/dev/sdb3. You should 
review console log output and look for the drive that's partitioned as expected 
or use "mount by label".

8.5 Conclusion

Now you are ready to reboot. With luck, 2.6.8-2 will come right up. If you get:

cannot open root device "sda3" or unknownblock(2.0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs or unknown-block(2.0)

Reboot with the "root=" changed as explained in 8.4.

Reply to: