Hello!

>       * stage1/stage1.S: Set the number of sectors for Stage 2 to 130.
>       * stage1/stage1_lba.S: Set the number of sectors for Stage 2 to 130.

If I understand correctly, this number is only needed when stage1 and
stage2 are written to a floppy.

The size of stage2 can now vary significantly dependent on the enabled
components. It is not good to read 130 sectors if stage2 fits in 90
sectors.

Possible better solutions:

1) Write "make floppy" target so that the GRUB shell is invoked to finish
the installation. Something like

DEVICE=/dev/fd0
cat stage1/stage1 stage2/stage2 >$(DEVICE)
sect_num = size(stage2/stage2)/512 (no exactly so, of course)
grub --batch << EOF
 device (fd0) $(DEVICE)
 install (fd0)+1 (fd0) (fd0)1+num 0x8000
EOF

2) Make stage1* depend on ../stage2/stage2

Any comments?

Pavel Roskin

Reply via email to