Results 1 to 10 of 17
How can i create a small bootable image(RAM-disk) that i can have for upgrade and installalation purpouses??. What i want to do is...
Boot on this small image that includes ...
- 08-08-2003 #1Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
How can i create a bootable img??
How can i create a small bootable image(RAM-disk) that i can have for upgrade and installalation purpouses??. What i want to do is...
Boot on this small image that includes the basic drivers and start the nic. Then connect against a repository that have a kickstartfile that tells how tha filesystems should be build and creates the filesystems after the specs. And then installs the new packages accourding the kickstartfile.
Have anybody done that??...Regards
Andutt
- 08-08-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
What's wrong with the images shipped by RH?
- 08-08-2003 #3Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
I want to build an image/ramdisk with our specific drivers on that is bootable so i can have free hands partitioning,installing,upgrading on the server with just the needed drivers loaded (automaticly)...can i do that??
How do i build a botable ramdisk?? mkisofs?? or can i create a specific /usr/lib/<bootstrap> directory with the specific modules and create a ramdisk with mkinitrd??
Any ideas anybody??Regards
Andutt
- 08-08-2003 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
mkisofs? Are looking to build a bootable CD? I though you were going to make a boot floppy.
I don't know if you know how the El-Torito boot scheme, so I guess I'll just explain it. Basically, you create a boot floppy image, then you put it in the CD file system, and you give the path to it, relative to the CD's root dir, and upon boot, the BIOS will emulate a floppy drive using that image.
That means that the boot image must be exactly as large as a floppy disk (although it may be as large as a 2.88 MB floppy as well). However, essentially, you only need to put a boot loader and the kernel on it, and then make the kernel use the CD as its root filesystem. Then just write some startup scripts to put on the CD. You can, of course, use an initrd as well, if you really want the root filesystem to be R/W.
Was there anything more that you wanted to know?
- 08-08-2003 #5Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
If i create an image with mkinitrd and put that on a floppy..will that work to boot on?? Without haveing anything else on the harddrives??
Regards
Andutt
- 08-08-2003 #6Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
That can boot, but you won't be able to actually do anything with it. The only that the initrds by mkinitrd can do is to load modules before the actual root file system is mounted, so you'll still need a root file system that will actually do something.
You know, you don't need an initrd. If possible, just boot the real root file system directly.
- 08-09-2003 #7Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
Yes i know about mkinitrd...but if im starting to mount filesystems like the root filesystem then i´m not able to create new filesystems with fdisk for example,right??
thats why i want to boot with somekind of ramdisk, that just starts everythig into memory and not touches the harddrives.Regards
Andutt
- 08-09-2003 #8Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
You can mount a CD-ROM as the root file system. Then you can do anything you want to the hard drives.
- 08-10-2003 #9Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
Yes..ok but can i somehow create a local image?? i would prefer not to use any extern media to get to this stage. Just for easier administration.
So when i want to upgrade my systems i just choose in lilo this upgradeimage.Regards
Andutt
- 08-10-2003 #10Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Ah! Now I understand what you mean. That's an interesting thing to do, of course.
In that case, it's pretty easy as well. Just create an initrd that contains everything you want, and add a LILO entry that loads it.
Don't use mkinitrd to create it, just create a template (ie. that contains the files that should be on the initrd) for it somewhere in your home dir, then just run these to create the initrd:
Then you'll have an initrd.gz in /tmp, that you can move to /boot and add to your lilo.conf. As you can see, this creates a filesystem that is 8 MBs, so just extend it if you need more.Code:dd if=/dev/zero of=/tmp/initrd bs=1024 count=8000 mke2fs /tmp/initrd mount -o loop /tmp/initrd /mnt/initrd cp -a ~/initrd-template/* /mnt/initrd umount /mnt/initrd gzip -9 /tmp/initrd
Just remember that when the kernel boots from an initrd, it doesn't use /sbin/init for the init process, but /linuxrc.
I guess the easiest thing to do, though, might be to create an initrd that mounts an nfs filesystem as the root filesystem. Then you won't ever have to upgrade the initrd.


Reply With Quote
