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

Re: [powerpc-floppies] Help Needed : root.img too big (1489688, should be 1474560).



On Tue, Jan 10, 2006 at 12:20:31AM +0100, Frans Pop wrote:
> On Monday 09 January 2006 00:55, Sven Luther wrote:
> > and also add the
> > bit of code Frans mentioned the x86 floppies already have for failing
> > if the image size is bigger than a floppy. I searched for it in
> > config/i386, but failed to find anything that did something like this.
> 
> The i386 floppies fail at this bit when size gets to big; mcopy may be 
> arch-specific though:
> mkfs.msdos -i deb00001 -n "Debian Inst" -C ./tmp/floppy_root/root.img 1440
> mkfs.msdos 2.11 (12 Mar 2005)
> mcopy -i./tmp/floppy_root/root.img ./tmp/floppy_root/initrd.gz ::initrd.gz
> Disk full

Ah, indeed, so it is a feature of mcopy, not an explicit check like i was
searching for, no wonder i didn't find it.

I think what i wanted to do, not sure if this is sane though, is something
like replacing this code in powerpc/powerpc/floppy.cfg :

arch_root:
        cp $(TEMP_INITRD) $(TEMP_ROOT)

With something like :

arch_root:
	if [ `find_size_of $(TEMP_INITRD)` -gt $(FLOPPY_SIZE) ]; then \
		echo "Fail horribly with size error message" \
		exit 1 \
	fi
        cp $(TEMP_INITRD) $(TEMP_ROOT)

Well, you get the idea, i am not sure arch_root is the best place for that,
neither if the cd-drivers or net-drivers will use this one or something else.
I guess this is something which could even been done in the common upper
layer.

Naturally, getting it to fail like this, and having someone notice and fix it
are two separate issues, i don't see those myself since crontab stopped
sending me email about the result of the build a couple of months ago, so i
only notice when an user report this, and it may often be too late for that.

Friendly,

Sven Luther




Reply to: