Re: How do I boot from different kernel when I don't have access to the console?

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

 



On Tue, 2004-01-20 at 22:03, prince wrote:
> Thank you Arnt and Ted,
> 
> It is very helpful.
> 
> Prince.
>  
> On Tue, 20 Jan 2004 04:59:25 +0100, Arnt Karlsen wrote
> > On Mon, 19 Jan 2004 18:40:52 -0500, 
> > Ted Kaczmarek <tedkaz@xxxxxxxxxxxxx> wrote in message 
> > <1074555651.20675.2.camel@tarkus>:
> > 
> > > On Wed, 2004-01-14 at 15:14, prince wrote:
> > > > Just to let you know, This is my /etc/grub.conf
> > > > 
> > > > % sudo cat /etc/grub.conf
> > > > 
> > > > # grub.conf generated by anaconda
> > > > #
> > > > # Note that you do not have to rerun grub after making changes to
> > > > # this file NOTICE:  You have a /boot partition.  This means that
> > > > #          all kernel and initrd paths are relative to /boot/, eg.
> > > > #          root (hd0,0)
> > > > #          kernel /vmlinuz-version ro root=/dev/hda3
> > > > #          initrd /initrd-version.img
> > > > #boot=/dev/sda
> > > > ### BEGIN AUTOMAGIC KERNELS LIST
> > > > default=0
> > 
> > ..also put in "fallback=0" below your new "default=1". 
> > 
> > > > timeout=10
> > > > splashimage=(hd0,0)/grub/splash.xpm.gz
> > > > 
> > > > title Red Hat Linux (2.4.20-28.9BOOT)
> > > >         root (hd0,0)
> > > >         kernel /vmlinuz-2.4.20-28.9BOOT ro root=/dev/sda3
> > 
> > ..behind your "root=/dev/sda3", append " panic=20 ", to avoid kernel
> > panics play USS Yorktown on your box.  ;-)
> > 
> > > Your default=0, that will always boot the 2.4.20-28.9BOOT,
> > > change it to 1 and it will boot the other version.
> > > You can also pick the other one manually, but your timeout is only 10
> > > seconds so pay attention :-) when booting.
> > 
> > ..not 10 tenths of a second?  ;-)

No, its 10 seconds. At least that's the way grub interprets it on my
gentoo box. Maybe different distros have compiled grub differently ??? I
hope not!

> > 
> > ..and it is also possible to set up serial consoles on modems or 
> > between remote boxes and have the paralell port control relays 
> > for power switches, before resorting to ups control tricks.  ;-)
> > 
> > -- 
> > ..med vennlig hilsen = with Kind Regards from Arnt... ;-)
> > ...with a number of polar bear hunters in his ancestry...
> >   Scenarios always come in sets of three: 
> >   best case, worst case, and just in case.
> 
> 
> 

some cut and paste from my /boot/grub/grub.conf - Gentoo Linux.
---
default 0
fallback 1
timeout 5

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title=Linux 2.6.1 (console on PC)
root (hd0,0)
kernel /boot/linux-2.6.1 root=/dev/hda3 console=ttyS0
---

notice that I have a console=ttyS0 flag. This gives me a console on a
serial port - which means you can control a headless server using just a
laptop. For this to work.
1. Kernel must be compiled with console-on-serial-port capability, AND
2. this capability must be enabled at boot time using the "console=tty#"
flag.

Also, if you are using grub, any changes to grub.conf take effect
immediately. You dont need to re-run grub for changes to take effect.

I have a /boot/boot entry that symlinks to /boot . This way I can use
full /boot/* paths everywhere without stepping all over the boot process
- its not my invention, its a gentoo thing.

NEVER mess with the fallback once you have it working correctly.
Inevitably, with a headless server like yours, you'll make a mistake one
day while editing and the fallback will step in to save you. So make
only one change at a time.

-- 

Ranjeet Shetye
Senior Software Engineer
Zultys Technologies
Ranjeet dot Shetye2 at Zultys dot com
http://www.zultys.com/
 
The views, opinions, and judgements expressed in this message are solely
those of the author. The message contents have not been reviewed or
approved by Zultys.




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux