FILO trunk can't boot from hdb, with or without my patch. Has anyone ever been able to boot a kernel from a slave device?
In blockdev.c unsigned long is used for the sector, this will overflow when a kernel is beyond 2TB on a drive. The IDE driver users sector_t which is typedef:ed to uint64_t or unsigned long long. Maybe GRUB2 will be here before this becomes a problem.
//Peter
On Sat, Apr 07, 2007 at 06:04:39AM +0200, Peter Stuge wrote:
FILO trunk can't boot from hdb, with or without my patch. Has anyone ever been able to boot a kernel from a slave device?
No, that's the same behaviour I've seen. Afaik, filo can only boot from the 'first' device.
In blockdev.c unsigned long is used for the sector, this will overflow when a kernel is beyond 2TB on a drive. The IDE driver users sector_t which is typedef:ed to uint64_t or unsigned long long. Maybe GRUB2 will be here before this becomes a problem.
Yeah. Grub2 support for LB would be awesome. Do we know yet if there are any takers for the GSOC projects?
Thanks, Ward.
* Ward Vandewege ward@gnu.org [070407 16:42]:
On Sat, Apr 07, 2007 at 06:04:39AM +0200, Peter Stuge wrote:
FILO trunk can't boot from hdb, with or without my patch. Has anyone ever been able to boot a kernel from a slave device?
No, that's the same behaviour I've seen. Afaik, filo can only boot from the 'first' device.
Any logs for the failure case?
Yeah. Grub2 support for LB would be awesome. Do we know yet if there are any takers for the GSOC projects?
Yes, several. :-) No ideas whether we get one of them though.
On Sat, Apr 07, 2007 at 07:41:31PM +0200, Stefan Reinauer wrote:
FILO trunk can't boot from hdb, with or without my patch. Has anyone ever been able to boot a kernel from a slave device?
No, that's the same behaviour I've seen. Afaik, filo can only boot from the 'first' device.
Any logs for the failure case?
I'll make one later tonight when I get back home.
//Peter
On Sat, Apr 07, 2007 at 08:22:02PM +0200, Peter Stuge wrote:
FILO trunk can't boot from hdb, with or without my patch. Has anyone ever been able to boot a kernel from a slave device?
Any logs for the failure case?
(The factory BIOS sees the device on primary slave.)
FILO version 0.5 (stuge@carepad4) Sun Apr 8 03:16:08 CEST 2007 Can't get memory map from firmware. Using hardcoded default. boot: hdb1:/boot/kernel-genkernel-x86-2.6.18 root=/dev/hdb1 ide_software_reset: Waiting for ide0 to become ready for reset... ok IDE time out waiting for bsy No drive detected on IDE channel 0 boot: hdb1:/boot/kernel-genkernel-x86-2.6.18 root=/dev/hdb1 Drive 1 does not exist boot: hdb1:/boot/kernel-genkernel-x86-2.6.18 root=/dev/hdb1
The "waiting for bsy" was added by me to pinpoint where it times out.
It's in ide_software_reset()..
/* Disable Interrupts and reset the ide bus */ outb(IDE_CTRL_HD15 | IDE_CTRL_SRST | IDE_CTRL_NIEN, IDE_REG_DEVICE_CONTROL(ctrl));
/* If BSY bit is not asserted within 400ns, no device there */ if (await_ide(bsy, ctrl, currticks() + IDE_RESET_PULSE) < 0) { return -1; }
And so, it fails. I tried increasing IDE_RESET_PULSE to 1s but still no go.
//Peter
Peter Stuge wrote:
On Sat, Apr 07, 2007 at 08:22:02PM +0200, Peter Stuge wrote:
FILO trunk can't boot from hdb, with or without my patch. Has anyone ever been able to boot a kernel from a slave device?
To clarify, there are still 2 devices attached, device 0 and device 1, but you want to boot from device 1?
On Sat, Apr 07, 2007 at 11:32:25PM -0400, Tom Sylla wrote:
Peter Stuge wrote:
On Sat, Apr 07, 2007 at 08:22:02PM +0200, Peter Stuge wrote:
FILO trunk can't boot from hdb, with or without my patch. Has anyone ever been able to boot a kernel from a slave device?
To clarify, there are still 2 devices attached, device 0 and device 1, but you want to boot from device 1?
I only had 1 device, the slave.
Should still work, no? If not, what kind of tricks does the BIOS do to see the device?
//Peter
Peter Stuge wrote:
On Sat, Apr 07, 2007 at 11:32:25PM -0400, Tom Sylla wrote:
Peter Stuge wrote:
On Sat, Apr 07, 2007 at 08:22:02PM +0200, Peter Stuge wrote:
> FILO trunk can't boot from hdb, with or without my patch. Has > anyone ever been able to boot a kernel from a slave device?
To clarify, there are still 2 devices attached, device 0 and device 1, but you want to boot from device 1?
I only had 1 device, the slave.
Should still work, no? If not, what kind of tricks does the BIOS do to see the device?
More magic :)
Take a look at reg_config and reg_reset in atadrvr.
From the comments for reg_config:
"// This process is not documented by any of the ATA standards."
Try that mechanism out, and see if it works better. I didn't check, but the Linux kernel driver may do something similar.
* Peter Stuge stuge-linuxbios@cdy.org [070407 06:04]:
In blockdev.c unsigned long is used for the sector, this will overflow when a kernel is beyond 2TB on a drive. The IDE driver users sector_t which is typedef:ed to uint64_t or unsigned long long. Maybe GRUB2 will be here before this becomes a problem.
There is no portable 128 bit type on 32bit platforms. Except you use a struct { u64 low; u64 high; };
I think the problem is on x86 you need all registers at once to describe a single 128bit value ;)
This has been nasty in linuxbios.
On Sat, Apr 07, 2007 at 07:44:00PM +0200, Stefan Reinauer wrote:
- Peter Stuge stuge-linuxbios@cdy.org [070407 06:04]:
In blockdev.c unsigned long is used for the sector, this will overflow when a kernel is beyond 2TB on a drive. The IDE driver users sector_t which is typedef:ed to uint64_t or unsigned long long. Maybe GRUB2 will be here before this becomes a problem.
There is no portable 128 bit type on 32bit platforms. Except you use a struct { u64 low; u64 high; };
Oh, no, what I meant is that parts of FILO are using a 32 bit variable for sector values.
I think the problem is on x86 you need all registers at once to describe a single 128bit value ;)
Hehe. Yeah. But you can cheat and use MMX or SSE. :)
//Peter