|
From: Joseph Rosevear on 22 Apr 2008 00:31 Helmut Hullen <helmut(a)hullen.de> wrote: > Hallo, Joseph, > Du meintest am 19.04.08: > >> I need some possibility to boot a machine via "initrd" and telling > >> "initrd" another "root device" than the pre-installed device in the > >> "initrd". > > I have a solution that I use that I think would meet your needs. As > > Alan said, it is not simple. It is like Frank's method, but you do > > not recompile busybox. > > I do it by making a boot disk (Joe's Boot Disk) which is a CD. This > > method also uses grub. This works well and is able to do what you > > said. You can put the disk into a machine and boot. > The way you describe is similar to my actual way. > First I use slackware's "mkinitrd" with a very long modules list to make > the first stage initrd (one of the options: "-c"). [snip] Hallo Helmut, You gave some interesting information. I learned a few things. Especially, I didn't know how to make an initrd.gz except by use of mkinitrd. And I didn't know how to expand an initrd.gz. Thank you! It looks like you aren't interested in using a boot disk? I'm not sure, but it seems you want to make packages that both install a kernel and make an initrd.gz that can be used by lilo. Have I got it right? This way the user just installs your package, and bingo, he has a bootable machine? What I've done is a little different. It would be a shift of thought from what you are doing. Maybe it would help. You decide. My way is to make a grub CD with one or more kernels on it. The initrd.gz includes modules for the various kernels and it has commands that I might want to use in the first stage of booting. Script init prompts the user like this: vvv ERR=1 #JHR 060706 #Do this until the mount succeeds while [ ! "$ERR" = "0" ]; do echo echo "Type the partition name you wish to boot followed," echo "optionally, by the filesystem type (default: $ROOTFS)." echo "Then press <Enter>." echo read partition fstype ROOTDEV=/dev/"$partition" if [ "$fstype" != "" ]; then ROOTFS="$fstype"; fi if [ "$partition" = "command" ]; then ash ERR=1 else ### cat << done *** continue reading here *** done ### echo "doing \"mount -o ro -t $ROOTFS $ROOTDEV /mnt\"" mount -o ro -t $ROOTFS $ROOTDEV /mnt ERR="$?" if [ ! "$ERR" = "0" ]; then ### cat << done The partition you named could not be mounted. Did you enter the name of the partition correctly? Is there a device of that name in the boot disk's /dev? Is the filesystem type correct? You may try again. Or you may quit. If you wish to quit, please switch off the computer, then switch off the external drive or unplug it. You may optionally remove the boot disk before switching off the computer. done ### fi fi done ^^^ When the disk boots grub gives a menu that allows the user to choose a kernel. So the user of my boot disk needs to think a little. He needs to choose the right kernel, and he needs to enter the partition and the file system name. I made this so I could run Slackware on a USB hard drive plugged into many different boxes. And it makes setting up a new Slackware installation easier. I skip the steps about lilo and the kernel. My machines won't boot without the boot disk, but there are benefits. OK, there is the work of making the boot disk. Also something special... notice the line in init that runs ash? That helps to boot a stubborn or broken system. I can use commands depmod, fdisk, insmod, ldconfig, ls, lsmod, mkdir, modprobe, mount, mv, pwd, rmmod, umount, vi, and a few others at the command line during the first stage of the boot. Helpful. -Joe
From: Helmut Hullen on 22 Apr 2008 02:49 Hallo, Joseph, Du meintest am 22.04.08: > You gave some interesting information. I learned a few things. > Especially, I didn't know how to make an initrd.gz except by use of > mkinitrd. And I didn't know how to expand an initrd.gz. Thank you! No thanks - I've learned changing the initrd last week ... > It looks like you aren't interested in using a boot disk? Kernel: about 1.8 MByte initrd.gz: about 1.8 MByte No chance for a Floppy disk. > I'm not sure, but it seems you want to make packages that both install > a kernel and make an initrd.gz that can be used by lilo. Have I got > it right? > This way the user just installs your package, and bingo, he has a > bootable machine? Yes - that's the way I need. And it seems to work now with the (ugly) way to expand, change and repack the initrd. > What I've done is a little different. It would be a shift of thought > from what you are doing. Maybe it would help. You decide. If I have understood your way you make a CD-ROM with all your needs - it's not for installing on a hard disk. I need the multi purpose kernel an initrd for a schoolserver which is installed by people with no practice in linux. > My way is to make a grub CD with one or more kernels on it. The > initrd.gz includes modules for the various kernels and it has > commands that I might want to use in the first stage of booting. > Script init prompts the user like this: I don't like grub ... but that's not the major problem. > vvv > ERR=1 > #JHR 060706 > #Do this until the mount succeeds > while [ ! "$ERR" = "0" ]; do > echo > echo "Type the partition name you wish to boot followed," > echo "optionally, by the filesystem type (default: $ROOTFS)." > echo "Then press <Enter>." Imagine a teacher (m/f/n) on a primary school with no experience in linux. He/she/it will only install a schoolserver, and the system asks him/her those nasty things. > So the user of my boot disk needs to think a little. He needs to > choose the right kernel, and he needs to enter the partition and the > file system name. And that's too much for colleagues who only want a running machine (like a hoover or a frigidaire). > I made this so I could run Slackware on a USB hard drive plugged into > many different boxes. And it makes setting up a new Slackware > installation easier. I skip the steps about lilo and the kernel. > My machines won't boot without the boot disk, but there are benefits. It's a very interesting way, and I'll take a long look on it. But it needs an experienced user (I am! Sure!!!!11). > OK, there is the work of making the boot disk. Just one problem: new laptops have no floppy disk drive, news desktops and towers have no floppy disk drive. My IBM Thinkpad T2x allows changing the CD-ROM drive against a floppy disk drive, but I haven't seen yet a floppy disk drive for my T40. Mainboards have still a connector for the floppy disk drive - may be it will vanish in the next years. Please excuse my gerlish. Viele Gruesse Helmut "Ubuntu" - an African word, meaning "Slackware is too hard for me".
From: Joseph Rosevear on 23 Apr 2008 07:26 Helmut Hullen <helmut(a)hullen.de> wrote: [snip] > Kernel: about 1.8 MByte > initrd.gz: about 1.8 MByte > No chance for a Floppy disk. What floppy disk? The CD-ROM is the boot disk. I make it with this script. (My initrd.gz is in dir iso. It is referenced by grub when the user boots.): vvv #!/bin/sh #prep, by Joseph Rosevear. #Run this from the dir that contains this. #This makes a grub boot disk to start Slackware on a USB device or IDE. #functions ######################################################################## burnit() { # Check $cd_dev against "cdrecord -scanbus" fix if needed. # Check that $cd_speed is correct for what you are doing. cdrecord -v speed=`echo -n $cd_speed` dev=`echo -n $cd_dev` $2 -data $1.iso } ######################################################################## #main #abort if grub.iso exists if [ -e ../grub.iso ]; then echo echo grub.iso exists echo aborting... exit fi #make a working dir rm -R ../../current mkdir ../../current cp -RLpi ../iso ../../current pushd ../../current #Make the disk image mkisofs -R -b boot/grub/stage2_eltorito \ -no-emul-boot \ -boot-load-size 4 \ -boot-info-table \ -o grub.iso iso #Burn cd if [ "$1" = "rw" ]; then burnit grub blank=fast else burnit grub fi popd cp ../../current/grub.iso .. ^^^ [snip] > > This way the user just installs your package, and bingo, he has a > > bootable machine? > Yes - that's the way I need. And it seems to work now with the (ugly) > way to expand, change and repack the initrd. But it works, right? > > What I've done is a little different. It would be a shift of thought > > from what you are doing. Maybe it would help. You decide. > If I have understood your way you make a CD-ROM with all your needs - > it's not for installing on a hard disk. That is correct. I may try using my initrd.gz with lilo. This would give a second way (with no boot disk) to boot the same system. > I need the multi purpose kernel an initrd for a schoolserver which is > installed by people with no practice in linux. Sounds very interesting. > > My way is to make a grub CD with one or more kernels on it. The > > initrd.gz includes modules for the various kernels and it has > > commands that I might want to use in the first stage of booting. > > Script init prompts the user like this: > I don't like grub ... but that's not the major problem. I find grub to be annoyingly obscure, but it does something special... it can boot from a CD-ROM. The user uses grub only to pick a choice of kernel from a menu. Then grub uses that choice to start the first stage of the boot using initrd.gz. > > vvv > > ERR=1 > > #JHR 060706 > > #Do this until the mount succeeds > > while [ ! "$ERR" = "0" ]; do > > echo > > echo "Type the partition name you wish to boot followed," > > echo "optionally, by the filesystem type (default: $ROOTFS)." > > echo "Then press <Enter>." > Imagine a teacher (m/f/n) on a primary school with no experience in > linux. He/she/it will only install a schoolserver, and the system asks > him/her those nasty things. Yes, that's funny. I've already experienced some of the "that's too hard for me" knee-jerk thinking at the school where I work. There's no quicker way it seems to lose interest and support than to ask a person to think. [snip] > It's a very interesting way, and I'll take a long look on it. But it > needs an experienced user (I am! Sure!!!!11). It takes a little getting used to. You could do it. > > OK, there is the work of making the boot disk. > Just one problem: new laptops have no floppy disk drive, news desktops > and towers have no floppy disk drive. > My IBM Thinkpad T2x allows changing the CD-ROM drive against a floppy > disk drive, but I haven't seen yet a floppy disk drive for my T40. > Mainboards have still a connector for the floppy disk drive - may be it > will vanish in the next years. Yes, floppies are a vanishing breed. Sad. Initially I tried to use floppies to make my boot disks, but as you pointed out, they are too small. That is what pushed me to learn how to make grub boot disks (on CD-ROM). > Please excuse my gerlish. > Viele Gruesse > Helmut > "Ubuntu" - an African word, meaning "Slackware is too hard for me". Hallo, Helmut, I understand better now what it is that you are trying to do. I too have given some thought to providing Slackware servers to people. I did not think of doing it your way. I work at an elementary school, and I know about staff that are reluctant to do anything harder than pushing a button. Still I have been hoping that some people may be able to use a boot disk (on CD-ROM) and a USB hard drive. My plan was to prepare USB hard drives and boot disks and distribute them... not just to staff at school, but to anyone. It sounds like you are farther along in this than I am. I don't have a product yet, nor have I gotten a good handle on who my users would be. This is great what you have done. I am interested to hear how it goes for you, and I hope it goes well. If I do the same, but using USB hard drives, then we could compare notes afterwards and learn from each other... but I think you are way ahead of me. I was thinking of teaching a class called "An Introduction to Slackware Linux". Participants would bring USB hard drives to the class and together we would install Slackware to them. We would try out the installed systems in the class. Participants would take the USB hard drives home (or to work) with them. That is what has been in the front of my thoughts. So we are going in two slightly different directions. Good luck to you! Your gerlish is far better than my engdeutsch. Auf Wiederlesen Joe
First
|
Prev
|
Pages: 1 2 3 Prev: What the Hell is kwin-killer-hel? Next: /sbin/ldconfig at each boot |