linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Initramfs confusion
@ 2003-08-16 23:40 Garrett Kajmowicz
  2003-08-19  8:14 ` Rob Landley
  2003-08-21  3:55 ` H. Peter Anvin
  0 siblings, 2 replies; 5+ messages in thread
From: Garrett Kajmowicz @ 2003-08-16 23:40 UTC (permalink / raw)
  To: linux-kernel

I am just begining to test out 2.6 with an eye on use by X-terminals without 
hard drives or NFS. As such I am quite enthusiastic about initramfs.  After 
much stumbling around I created a root image that I would like to test, 
compiled into kernel and created image.

I am doing testing under VMWare with 2.88 MB floppy images (for testing 
purposes), but lilo is barfing trying to write to a regular file as a raw 
device (doesn't know how to handle device 0x0700).

I cannot use a real floppy because I do not have any 2.88 MB floppies

Any suggestions?  

Thanks for the help.

Garrett Kajmowicz
gkajmowi@tbaytel.net


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Initramfs confusion
  2003-08-16 23:40 Initramfs confusion Garrett Kajmowicz
@ 2003-08-19  8:14 ` Rob Landley
  2003-08-21 10:33   ` Miles Bader
  2003-08-21  3:55 ` H. Peter Anvin
  1 sibling, 1 reply; 5+ messages in thread
From: Rob Landley @ 2003-08-19  8:14 UTC (permalink / raw)
  To: gkajmowi, linux-kernel

On Saturday 16 August 2003 19:40, Garrett Kajmowicz wrote:
> I am just begining to test out 2.6 with an eye on use by X-terminals
> without hard drives or NFS. As such I am quite enthusiastic about
> initramfs.  After much stumbling around I created a root image that I would
> like to test, compiled into kernel and created image.
>
> I am doing testing under VMWare with 2.88 MB floppy images (for testing
> purposes), but lilo is barfing trying to write to a regular file as a raw
> device (doesn't know how to handle device 0x0700).
>
> I cannot use a real floppy because I do not have any 2.88 MB floppies
>
> Any suggestions?
>
> Thanks for the help.
>
> Garrett Kajmowicz
> gkajmowi@tbaytel.net

Here's a big cut and paste from a script of mine that does a lot of this gorp 
automatically while creating a bootable CD image.

Let me know if I missed something from the snip.  (I do remember there was 
some head scratching back when I was first figuring this out... :)

There are a number of assumptions baked into this script (I.E. earlier on an 
empty directory named sub (I.E. the sub directory) was created for use as a 
mount point, that sort of thing.  Shouldn't be too hard to figure out...)

Rob

echo === "Create a 2.88 meg floppy image (CD emulates floppy when booting)..."

rm -f floppy.img &&
dd if=/dev/zero of=floppy.img bs=512 count=5760 &&

echo === Format and mount it... &&

mke2fs -N 24 -m 0 -F floppy.img &&
tune2fs -c 0 -i 0 floppy.img &&
losetup /dev/loop7 floppy.img &&
mount /dev/loop7 sub &&

echo === Write lilo.conf for bootable CD... &&

rm -rf sub/lost+found &&
cat > sub/lilo.conf << EOF &&
boot=/dev/loop7
disk=/dev/loop7
        bios=0x00
        cylinders=80
        heads=2
        sectors=36
install=/boot.b
map=/map
backup=/dev/null
compact
geometric
image=/bzImage
        label=linux
        root=/dev/loop7
        initrd=ramdisk.img.gz
        read-write
EOF

echo === "Copy other data (kernel, ramdisk, dev, etc)..." &&

cat /boot/boot.b > sub/boot.b &&
cat /boot/vmlinuz > sub/bzImage &&
mv ramdisk.img.gz sub &&
mkdir sub/dev &&
cp -R /dev/{null,loop7} sub/dev &&
mkdir sub/tmp &&

echo === Run lilo to make image bootable.... &&

lilo -v -C lilo.conf -r sub &&
umount sub &&
losetup -d /dev/loop7

if [ $? -ne 0 ]; then exit 1; fi



> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Initramfs confusion
  2003-08-16 23:40 Initramfs confusion Garrett Kajmowicz
  2003-08-19  8:14 ` Rob Landley
@ 2003-08-21  3:55 ` H. Peter Anvin
  1 sibling, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2003-08-21  3:55 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <200308161940.52579.gkajmowi@tbaytel.net>
By author:    Garrett Kajmowicz <gkajmowi@tbaytel.net>
In newsgroup: linux.dev.kernel
>
> I am just begining to test out 2.6 with an eye on use by X-terminals without 
> hard drives or NFS. As such I am quite enthusiastic about initramfs.  After 
> much stumbling around I created a root image that I would like to test, 
> compiled into kernel and created image.
> 
> I am doing testing under VMWare with 2.88 MB floppy images (for testing 
> purposes), but lilo is barfing trying to write to a regular file as a raw 
> device (doesn't know how to handle device 0x0700).
> 
> I cannot use a real floppy because I do not have any 2.88 MB floppies
> 

I suggest using SYSLINUX instead for floppies.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Initramfs confusion
  2003-08-19  8:14 ` Rob Landley
@ 2003-08-21 10:33   ` Miles Bader
  2003-08-22  0:49     ` Rob Landley
  0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2003-08-21 10:33 UTC (permalink / raw)
  To: rob; +Cc: gkajmowi, linux-kernel

Rob Landley <rob@landley.net> writes:
> Here's a big cut and paste from a script of mine that does a lot of
> this gorp automatically while creating a bootable CD image.

I've no idea what the original poster really wants, but your script
seems to use initrd, not initramfs (which is much nicer than initrd in
theory).

-Miles
-- 
Occam's razor split hairs so well, I bought the whole argument!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Initramfs confusion
  2003-08-21 10:33   ` Miles Bader
@ 2003-08-22  0:49     ` Rob Landley
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Landley @ 2003-08-22  0:49 UTC (permalink / raw)
  To: Miles Bader, Miles Bader; +Cc: gkajmowi, linux-kernel

On Thursday 21 August 2003 06:33, Miles Bader wrote:
> Rob Landley <rob@landley.net> writes:
> > Here's a big cut and paste from a script of mine that does a lot of
> > this gorp automatically while creating a bootable CD image.
>
> I've no idea what the original poster really wants, but your script
> seems to use initrd, not initramfs (which is much nicer than initrd in
> theory).

The script was done for 2.4, where initramfs wasn't an option.  (I mentioned 
it being old, and a bit crufty.)

The original poster was saying they were having trouble creating a 2.88 floppy 
image, which is most of what that script snippet does.  (The bit that 
actually creates the root ramdisk that floppy uses was earlier in the script, 
and not included in the snip.  I believe the script just had a line to copy 
the ramdisk file onto the floppy image...)

> -Miles

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-22  0:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-16 23:40 Initramfs confusion Garrett Kajmowicz
2003-08-19  8:14 ` Rob Landley
2003-08-21 10:33   ` Miles Bader
2003-08-22  0:49     ` Rob Landley
2003-08-21  3:55 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).