Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Difficult turn to libATA (Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Sun May 08, 2011 4:37 pm    Post subject: Difficult turn to libATA (Solved) Reply with quote

Hi
I've read many posts and pages about that concern, but faced problem with every ways I tried.
I am quite prudent at these thing so I wanted to be able to jump back to a kernel I know to work,
and as I used to have 2 distributions on my machine, I have different a root=<device> line per entry in yaboot.conf.

First I just tried root=/dev/sda4 under the menu entry for the new kernel, keeping root=/dev/hda4 for other entries
-> kernels panics with unknown sda4
Then I tried root=UUID=<uuid> as in fstab
-> yaboot can not read the entry at boot time : can not boot just from hard disk any more ; CD boot.
Then I tried to give my gentoo root partition a label and give it to new kernel via root=/dev/disk/by-label/<label>
-> same panic with unknown disk/by-label/<label>

I'm sure I missed a lot of things but I can not get back on the track.
I read JoseJX said to convert all "hd" to "sd" in yaboot.conf but how to get back to a pre-libATA kernel then ?

Thanks in advance.


Last edited by sno35 on Tue Jun 21, 2011 5:56 am; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Sun May 08, 2011 6:29 pm    Post subject: Reply with quote

sno35,

I like this guide to libata migration

After you have made the switch, there is really no going back as you must change /etc/fstab to suit libata device names.
If you want to run old kernels, migrate one and make it work, the go back to the older kernel(s) and migrate them too.

The guide talks about grub.conf - you will change device names in yaboot.conf but its the same idea. I do have a working yaboot.conf for a Mac G5 using libata.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Sun Jun 19, 2011 11:13 am    Post subject: Reply with quote

Hi,
Thank you for trying to help me.
I tried to follow your guide (kernel configuration) but I can not get anywhere because I get the infamous "VFS: Cannot open root device or unknown-block(0,0) "
whatever i can give to kernel params :
Code:

image=/boot/vmlinux-2.6.39-gentoo-r1-l0
   label=linuxnou19
   root=GentooRoot
   read-only

image=/boot/vmlinux-2.6.39-gentoo-r1-l0
   label=linuxnou19a
   append="root=/dev/disk/by-label/GentooRoot"
   read-only

image=/boot/vmlinux-2.6.39-gentoo-r1-l0
   label=linuxnou19b
   root=/dev/sda4
   read-only

image=/boot/vmlinux-2.6.39-gentoo-r1-l0
   label=linuxnou19c
   append="root=/dev/disk/by-uuid/8d2fc254-4e49-4bc9-bb24-417a07b265a3"
   read-only


All of those fail with "/dev/" part removed when kernel tells me it can not find the root FS.

Quote:
After you have made the switch

I feel it should be "After you made the switch successful" because if the switch fails, I am nowhere. And as the last working boot CD I saw for PPC are pre-ATA the problem may last longer than my patience/skills can bear.
Quote:
, there is really no going back as you must change /etc/fstab


With my latest working kernel this fstab works OK. So I feel reluctant to throw it before I can see it is faulty. Why should it become faulty ?

Code:

#/dev/hda4              /               ext3            noatime                 1 1
LABEL=GentooRoot        /               ext3            noatime                 1 1
#/dev/hda6              none            swap            sw                      0 0
LABEL=FirstSwap         none            swap            sw                      0 0
#/dev/hda7              none            swap            sw,noauto               0 0
LABEL=SecondSwap        none            swap            sw,noauto               0 0


Regards
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Sun Jun 19, 2011 1:45 pm    Post subject: Reply with quote

sno35,

You have to do the switch all in one go (you can't cross a chasm in two small jumps)
So, the kernel has to be right and /etc/fstab has to be right and yaboot.conf has to be right ... all at the same time.
Code:
unknown-block(0,0)
means that the kernel cannot talk to your HDD controller. The immeadate issue is therefore the kernel.

Please post your lspci output so I can see your hardware and use wgetpaste to post your current kernel .config file.
That will be enough info to fix your kernel ... then we can move on to the next Gentoo learning experience
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Sun Jun 19, 2011 4:47 pm    Post subject: Reply with quote

Hi NeddySeagoon,
I agree on your diagnostic about kernel being the immediate problem. Your confirmation restore some self-confidence.
Here are the links :
lspci -kn :
http://paste.pocoo.org/show/414778
/proc/config.gz
http://paste.pocoo.org/show/414760

I am currently compiling a gentoo-sources-2.6.37-r4 with the .config that I used with my current kernel, to verify it do the job OK before libata.
I will try to compile the same sources with the libata adjustments and make the jump.

But I still can not see why with label used in fstab could not suffice once the kernel has found the root.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54097
Location: 56N 3W

PostPosted: Mon Jun 20, 2011 6:47 pm    Post subject: Reply with quote

sno35,

From your lspci, plugging
Code:
106b:003b +kernel
into google shows this page which shows you need the symbol CONFIG_PATA_MACIO in your kernel .config file. You must not use a text editor to fix it.

I need the config file from your broken kernel to check settings, /proc/config.gz is from the currently running kernel.

Some heavy hints anyway
Code:
< > ATA/ATAPI/MFM/RLL support (DEPRECATED)  --->
must be off, or you may end up with two drivers. Thats always a bad thing.
Code:
<*> Serial ATA and Parallel ATA drivers  --->
must be on as built in. It enables the libata menu
Code:
[*]   ATA SFF support
[*]     ATA BMDMA support
must both be on or you won't see the PATA_MACIO option that you need
Well down the list you will find
Code:
<*> Apple PowerMac/PowerBook internal 'MacIO' IDE
which is what you need and I suspect you are missing.

As libata provides low level drivers for the SCSI stack, you need the high level drivers for the SCSI stack too. Thats
Code:
SCSI device support  --->
 [*] legacy /proc/scsi/ support
 <*> SCSI disk support
 <*> SCSI CDROM support
 <*> SCSI generic support
all of these options must be built in as you are not using an initrd.
Since you don't have any real SCSI devices
Code:
 [ ] SCSI low-level drivers  --->
should be off to avoid kernel bloat.

Your hard drives will now get /dev/sd* names and your optical drives will become /dev/sr* devices. udev will sort out the optical drives - the symlinks will be made correctly.

You must fix yast.conf and /etc/fstab.

One trap for the unwary. Don't leve any USB storage devices plugged in at boot time. On some systems they are detected before real HDDs, so all your HDDs get renamed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Mon Jun 20, 2011 11:25 pm    Post subject: Reply with quote

Neddy thank you \o/
[:roi] (http://totoz.eu/gif/roi.gif)
I had missed this one :
Quote:
Code:
<*> Apple PowerMac/PowerBook internal 'MacIO' IDE

although I scanned the list twice (too quickly, as I was not sure it should really exists).
And it works with the fstab with the LABEL entries and /dev/sda4 in the yaboot.conf ;-)
Thanks again.
Regards
Laurent G.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum