Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emergency Boot-Floppy Easy Made
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Sun May 26, 2002 1:42 pm    Post subject: Emergency Boot-Floppy Easy Made Reply with quote

How to create an emergency boot-floppy with just a safe kernel
Since time and again the question occurs what to do if you failed in compiling a new kernel or blew your boot-loader, here's a short and easy way to have at least a working kernel on a boot-floppy:

  1. configure a kernel. be sure, it works! do not include probably unsafe or experimantal parts, if you do not really need them! Do not use modules! - at least not for needed parts!
  2. make clean dep bzImage
  3. if your kernel is > 1.4MB go back to step 1 and remove some features (are you sure you need firewire for booting?)
  4. cp /usr/src/linux/arch/i386/boot/bzImage /tmp/rescuekernel
  5. rdev /tmp/rescuekernel /dev/hdxx where xx is your root-device, eg. a5
  6. dd if=/tmp/rescuekernel of=/dev/fd0

you might want to repeat this with every kernel you find to run stable and fullfilling your requiered (not desired!) needs. you also might find it usefull to write-protect the floppy afterwards - kids and wifes like overwriting them ;)

ad 1.: configuring a kernel is something every gentoo-user should be able to. just obey one basic rule: do not remove anything from a default vanilla-config if you are not absolutly sure you don't need it. missing initial consoles or keyboards are often heard problems afterwards. to get the original .config do a make mrproper
ad 2. make clean just to be sure - this is why we make a boot floppy
ad 5: I'm not sure rdev is in the default installation. if it is not, someone might please add the package name here!

PS: this of course does not help if you blew your root-device, it's just an emergency kernel!

hth

* ElCondor pasa *

PS: thanks to lx for the hint with make mkproper
_________________
Here I am the victim of my own choices and I'm just starting!


Last edited by ElCondor on Fri May 31, 2002 12:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Thu May 30, 2002 2:02 pm    Post subject: Reply with quote

use make mrproper too clean out the kernel source tree (this also deletes .config) before doing make menuconfig ......

What does this disk do? boots the kernel and then continues the normal on disk (/dev/hda5) boot process.

Although this may be needed on some systems (non-bootable cdrom / unsupported filesystems), don't we already have a boot disk???. The gentoo cdrom is bootable and I can chroot into my custom-made gentoo distro using it. This way you can also from other crashes (wrong inittab) etc. Everybody should have a to get back into your system with a standard console.

Everybody should learn the following hard lesson:
:!: NEVER EVER OVERWRITE YOUR KERNEL WITH AN UNTESTED ONE, WITHOUT SECURING THE ONE THAT WORKS. :!: :wink:
:!: A kernel is a terrible thing to waste and before trying a new one you should always backup your old one and make a link into your boot manager (this way you can revert to your old system).
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Fri May 31, 2002 12:21 pm    Post subject: Reply with quote

YES, you can always boot from cdrom,
BUT once you have a kernel supporting special hardware you have installed or eg needing special features only supported by a newer kernel (maybe 2.5) you might be glad having a boot-disk ready with it ;)

Additionaly you can add own needed kernel-modules to your kernel which are not included on the gentoo-cd, but being loaded when booting from the boot-floppy.

I hope no one ever needs it, but due to my experiences I found it rather useful ;)

* ElCondor pasa *
_________________
Here I am the victim of my own choices and I'm just starting!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum