[syslinux] pxelinux bug's
Iouri Kharon
bc-info at styx.cabel.net
Tue Jun 19 01:36:26 PDT 2007
Hi Geert!
Tuesday, June 19, 2007, you wrote:
>> The attached patch contains three small (although 2 of them are
>> fundamental :) fixes for pxelinux
GS> Peter prefers patches created with git.
Diff was created as -uP (old Linus style :). Ok, I'm recreate it with -up,
"not compress", and include inline :). But also attach is as text (included
attachment can't used for patch :).
Redescription:
1. Alignment error when more than one initramfs are loaded using initrd
- the alignment of the last disk is discarded in calculations but is
ALWAYS present when the loading procedure is called. As a result - the
second image (cpio) is not recognized.
2. On some platforms (vmware for example :), READING from the video memory
in the 32bit mode is impossible (causes an exeption). Taking in to account
that the scroll function in ilinux/arch/i386/boot/compressed/misc.c
works using a memcpy of the video memory, when the linux bootsector is given
control and the cursor is at the end of the screen (-1-2 lines) an exception is
arisen and in the presence of it's handler in the bootloader the system halts.
Both lilo and grub handle this situation - the cursor is always somewhere at the
middle of the screen when the control is given to the linux bootsector.
When using pxelinux taking in to account that the PXE bios prints out the
presence of the second initramfs which causes the screen to scroll and the bug
to appear :)
A very simple solution - the screen is cleared before giving control to the
linux bootsector (in the patch).
3. If more than one initramfs are loaded then before every "Loading..."
message (but the first) an extra new line is added. A small thingy but
anyway :)
Best regards,
Iouri mailto:bc-info at styx.cabel.net
-------------------------------------
--- syslinux-3.51/runkernel.inc.orig 2007-06-11 02:51:39.000000000 +0400
+++ syslinux-3.51/runkernel.inc 2007-06-19 12:19:37.000000000 +0400
@@ -472,6 +472,14 @@ kill_motor:
int 16h
%endif
;
+; MUST clear screen before jmp to linux boot sector:
+; some configuration can't read videomemory and 'scroll' in misc.c don't work
+;
+ mov ax,0fh
+ int 10h
+ mov ax,3
+ int 10h
+;
; Set up segment registers and the Linux real-mode stack
; Note: es == the real mode segment
;
@@ -600,11 +608,8 @@ loadinitrd:
mov es,ax
push ecx ; Bytes to load
- cmp dword [es:su_ramdisklen],0
- je .nopadding ; Don't pad the last initrd
add ecx,4095
and cx,0F000h
-.nopadding:
add [es:su_ramdisklen],ecx
mov edx,[HighMemSize] ; End of memory
dec edx
@@ -626,6 +631,11 @@ loadinitrd:
mov edi,edx ; initrd load address
push si
mov si,crlfloading_msg ; Write "Loading "
+ cmp ecx,[es:su_ramdisklen]
+ je .firstdisk
+ inc si ; Skip (doubling) CRLF on non first disk
+ inc si
+.firstdisk:
call cwritestr
mov si,InitRDCName ; Write ramdisk name
call cwritestr
--
Best regards,
Iouri mailto:bc-info at styx.cabel.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: syslinux.3.51-pxeroot.diff
Type: application/octet-stream
Size: 1214 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20070619/cf6aba44/attachment.obj>
More information about the Syslinux
mailing list