Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: NotoriousPyro on February 24, 2011, 08:55:49 AM

Title: Booting without SATA controller?
Post by: NotoriousPyro on February 24, 2011, 08:55:49 AM
Hi,

I have a partially dead NAS here and I already have it's replacement. But for the old one I want to know is there any way to boot TCL without SATA controllers? Those are the only thing stopping TCL from booting (or any other Linux kernel with SATA support for that matter).

Cheers in advance :)
Title: Re: Booting without SATA controller?
Post by: gerald_clark on February 24, 2011, 11:09:47 AM
1. PATA controller
2. USB controller
3. PXE
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 24, 2011, 02:24:29 PM
I'm not sure I follow... Do you mean try those to boot from? That won't work because the kernel is trying to configure the SATA controllers and that is where it fails.

I am trying to boot from a USB key and it freezes when it gets to the SATA drive detection.

I need to bypass this somehow.
Title: Re: Booting without SATA controller?
Post by: Rich on February 24, 2011, 03:59:44 PM
Hi NotoriousPyro
You need to enable debugging messages to the console to try to find out which mem/io
addresses the SATA is using. Then try using the "reserve" bootcode to tell the kernel
to ignore them. I think the "ignore_loglevel" bootcode might get you those messages
but I'll defer to someone else on that point.

 [EDIT]: earlyprintk=vga and debug are the other codes you want.
Title: Re: Booting without SATA controller?
Post by: tinypoodle on February 24, 2011, 04:22:19 PM
Also, do a search for "libata" here:
http://www.kernel.org/doc/Documentation/kernel-parameters.txt
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 24, 2011, 06:45:15 PM
Hi NotoriousPyro
You need to enable debugging messages to the console to try to find out which mem/io
addresses the SATA is using. Then try using the "reserve" bootcode to tell the kernel
to ignore them. I think the "ignore_loglevel" bootcode might get you those messages
but I'll defer to someone else on that point.

 [EDIT]: earlyprintk=vga and debug are the other codes you want.

Those don't seem to be doing anything, or maybe I'm doing it wrong? ;D

At the moment I'm having trouble just booting the USB key, I've edited isolinux.cfg and syslinux.cfg to read:
Code: [Select]
label microcore
kernel /boot/bzImage
append ignore_loglevel earlyprintk=vga initrd=/boot/microcore.gz

Though the output looks exactly the same... It reads (before it freezes):
Code: [Select]
ata1: SATA link down (SStatus 0 SControl 300)
ata5: SATA link down (SStatus 0 SControl 300)
usb 1-1: new high speed USB device using ehci_hcd and address 2
ata2: SATA link down (SStatus 0 SControl 300)

I've tried leaving it to boot itself and it seemed to get further (up to all the coloured text showing boot was virtually complete) yet it freezes shortly after "Done."
Title: Re: Booting without SATA controller?
Post by: Rich on February 24, 2011, 09:18:21 PM
Hi NotoriousPyro
Try reserve=0x300,8 and see what happens.
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 26, 2011, 12:06:35 PM
Not sure if it's doing anything, perhaps I'm entering it in the wrong place? I know where to enter that stuff on Ubuntu but not on here - the boot screen seems a lot different.
Title: Re: Booting without SATA controller?
Post by: Rich on February 26, 2011, 12:48:53 PM
Hi NotoriousPyro
Add it to the append line. I'm guessing by the output you posted that the SATA
controller is at port address 300 so this command tells the kernel to keep it's
hands off of 300-307. Look for changes in the kernel messages, or post them.

Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 26, 2011, 09:38:33 PM
I have done but it doesn't seem to do anything... My syslinux.cfg looks like this at the moment:

Code: [Select]
DEFAULT /boot/bzImage
APPEND initrd=/boot/microcore.gz reserve=0x300,8 --
LABEL microcore
  KERNEL /boot/bzImage
  APPEND initrd=/boot/microcore.gz reserve=0x300,8 --
DISPLAY boot.msg
TIMEOUT 300
PROMPT 1
F1 boot.msg
F2 f2
F3 f3
F4 f4
Title: Re: Booting without SATA controller?
Post by: Rich on February 26, 2011, 10:04:53 PM
Hi NotoriousPyro

DISPLAY boot.msg
DEFAULT microcore
LABEL microcore
KERNEL /boot/bzImage
APPEND initrd=/boot/microcore.gz reserve=0x300,8 ignore_loglevel earlyprintk=vga
PROMPT 1
TIMEOUT 300
F1 boot.msg
F2 f2
F3 f3
F4 f4

Post the last few lines if it still freezes.

Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 27, 2011, 01:20:13 PM
Same result mate:
Code: [Select]
ata1: SATA link down (SStatus 0 SControl 300)
ata5: SATA link down (SStatus 0 SControl 300)
usb 1-1: new high speed USB device using ehci_hcd and address 2
ata2: SATA link down (SStatus 0 SControl 300)
:'(
Title: Re: Booting without SATA controller?
Post by: gerald_clark on February 27, 2011, 01:29:39 PM
Have you tried disabling the drives in the BIOS?
Title: Re: Booting without SATA controller?
Post by: Rich on February 27, 2011, 03:56:59 PM
Hi NotoriousPyro
Post the 10 lines just prior to the link down message.
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 28, 2011, 12:15:14 PM
Have you tried disabling the drives in the BIOS?
Unfortunately, they can't be disabled through the BIOS since it is a QNAP NAS.
Hi NotoriousPyro
Post the 10 lines just prior to the link down message.
I'll post all of what is on screen at the time of boot...
Code: [Select]
usbcore: registered new interface driver ums-usbat
usbcore: registered new interface driver berry_charge
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
usbcore: registered new interface driver appletouch
usbcore: registered new interface driver bcm5974
cpuidle: using governor ladder
cpuidle: using governor menu
padlock: VIA PadLock not detected.
padlock: VIA PadLock Has Engine not detected.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
Using IPI No-Shortcut mode
ata1: SATA link down (SStatus 0 SControl 300)
ata5: SATA link down (SStatus 0 SControl 300)
usb 1-1: new high speed USB device using ehci_hcd and address 2
ata2: SATA link down (SStatus 0 SControl 300)
Title: Re: Booting without SATA controller?
Post by: tinypoodle on February 28, 2011, 12:28:37 PM
Have you even tried all potential options as hinted in Reply #4?

And what happens if you remove the USB key just after the initrd has finished loading?
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 28, 2011, 12:44:32 PM
Have you even tried all potential options as hinted in Reply #4?

And what happens if you remove the USB key just after the initrd has finished loading?
Well . me sideways... It seems to boot if I remove the USB key and keyboard after microcore.gz has finished loading...

Could it be possible the USB is to blame?

Edit: I've changed the USB Emulation Type in the BIOS to Forced FDD and it seems to boot, if it's Hard Disk it just freezes up.

Any ideas?
Title: Re: Booting without SATA controller?
Post by: tinypoodle on February 28, 2011, 02:16:54 PM
Could be related to the fact that both sata disks and USB storage emulated as HD are recognized as sdxN devices.
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on February 28, 2011, 02:29:46 PM
Could be related to the fact that both sata disks and USB storage emulated as HD are recognized as sdxN devices.
So the NAS is dead basically? Unless I replace the onboard DOM with one larger than 128MB I suppose... Seems to boot fine from that without HDDs or USB devices.
Title: Re: Booting without SATA controller?
Post by: tinypoodle on February 28, 2011, 02:55:32 PM
Why would you ask that without having tried to tweak libata parameters at boot?

Also, didn't you imply that by changing BIOS setting everything works as expected?
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on March 05, 2011, 06:35:58 AM
I've dug around a little and found out the following. I got a 2.5 (44 pin) to 3.5 (40 pin) PATA adapter and I connected an old IDE HDD and I still couldn't get it to boot with a USB keyboard attached so I copied Ubuntu 10.10 server onto a USB drive and looked at a few boot options it has. I tried noapic and for some reason it works!

I'm going to try a SATA device with noapic soon and see what happens.

Thank you guys for your help!
Title: Re: Booting without SATA controller?
Post by: tinypoodle on March 05, 2011, 09:37:16 AM
While Ubuntu may explicitely mention 'noapic', this is a parameter of the kernel per se ('nolapic' would be a related one) and nothing stops you to use it with TC (or other Linux systems).
Title: Re: Booting without SATA controller?
Post by: NotoriousPyro on March 05, 2011, 02:15:54 PM
Yeah, I've managed to use noapic with the default software on the NAS and it works. nolapic seems to have weird effects so I've got rid of it since it seems to cause more problems than fixes them, though noapic works well :D

SATA and USB devices are working again now too! Thanks for the advice :)