Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem booting to new kernel / os x [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
hexadevil
n00b
n00b


Joined: 14 Apr 2006
Posts: 13

PostPosted: Tue Aug 15, 2006 9:01 pm    Post subject: Problem booting to new kernel / os x [SOLVED] Reply with quote

This is my first attempt at gentoo on a g5, and i believe i have the environment pretty well configured, but something isn't quite right, because neither linux nor osx will boot from the yaboot loader. However, I can get OSX to boot when I use the loader in the OF (by holding Alt as it boots). When I boot to either linux or osx from yaboot, all i get is a gray screen. That being said, here are some relevant configuration files to take a look at and see if i made some obvious mistake.

First off, my mac-fdisk partition list:
Code:
/dev/sda
#                    type name                  length   base      ( size )  system
/dev/sda1     Apple_partition_map Apple                     63 @ 1         ( 31.5k)  Partition map
/dev/sda2         Apple_Bootstrap bootstrap               1600 @ 64        (800.0k)  NewWorld bootblock
/dev/sda3         Apple_UNIX_SVR2 swap                 2097152 @ 1664      (  1.0G)  Linux swap
/dev/sda4         Apple_UNIX_SVR2 root                82912616 @ 2098816   ( 39.5G)  Linux native
/dev/sda5               Apple_HFS Apple_HFS_Untitled_1 227570360 @ 85011432  (108.5G)  HFS
/dev/sda6              Apple_Free                           16 @ 312581792 (  8.0k)  Free space

Block size=512, Number of Blocks=312581808
DeviceType=0x0, DeviceId=0x0


Next, my fstab:
Code:
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>
/dev/sda4               /               ext3            noatime         0 1
/dev/sda3               none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      iso9660         noauto,ro       0 0
proc                    /proc           proc            defaults        0 0
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0


Finally, my yaboot.conf:
Code:
boot=/dev/sda2
ofboot=sd:2
device=sd:
delay=30
timeout=40
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/vmlinux
        label=Gentoo Linux
        root=/dev/sda4
        read-only
        partition=4

macosx=sd:5
enablecdboot
enableofboot


Thoughts or suggestions?


Last edited by hexadevil on Tue Aug 22, 2006 6:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
corsair
Retired Dev
Retired Dev


Joined: 06 Oct 2003
Posts: 451
Location: Aachen, Germany

PostPosted: Wed Aug 16, 2006 8:20 am    Post subject: Reply with quote

let me first say that I haven't seen such a problem before, so everything I say is just a guess.. :?

try adding this to your yaboot.conf:

Code:
# partition containing the kernel images
partition=3


I do not use sd:5 in my yaboot.conf to specify macosx, but this:

Code:
macosx=/dev/sda5


maybe this helps, but I'm not sure why sd:5 shouldn't work...

P.S.: don't forget to run ybin after you made the changes. :wink:
Back to top
View user's profile Send private message
hexadevil
n00b
n00b


Joined: 14 Apr 2006
Posts: 13

PostPosted: Wed Aug 16, 2006 12:08 pm    Post subject: Reply with quote

I don't exactly see how using partition=3 is going to help me. Based on my disk configuration, my root is on sda4, so shouldn't partition be set to 4, not 3?
Back to top
View user's profile Send private message
hexadevil
n00b
n00b


Joined: 14 Apr 2006
Posts: 13

PostPosted: Wed Aug 16, 2006 4:33 pm    Post subject: Reply with quote

Quote:
I do not use sd:5 in my yaboot.conf to specify macosx, but this:

Code:
macosx=/dev/sda5


That seems to work, I can now boot to OS X from the yaBoot menu, but linux still hangs on a gray screen when trying to boot the kernel.
Back to top
View user's profile Send private message
corsair
Retired Dev
Retired Dev


Joined: 06 Oct 2003
Posts: 451
Location: Aachen, Germany

PostPosted: Thu Aug 17, 2006 8:19 am    Post subject: Reply with quote

hexadevil wrote:
That seems to work, I can now boot to OS X from the yaBoot menu, but linux still hangs on a gray screen when trying to boot the kernel.


ok. to make this clear: you are seeing the screen where you can decide between linux and os x. if you select linux then you get another screen where you can select the kernel (just one in your case) or it autoboots the kernel. and then it shows a gray screen?

If this is the case then I think it is a kernel issue. maybe you forget the correct framebuffer. is your card from nvidia or ati? I have had problems with an X800 card lately. I had to use the 'video=ofonly' option.
Back to top
View user's profile Send private message
hexadevil
n00b
n00b


Joined: 14 Apr 2006
Posts: 13

PostPosted: Thu Aug 17, 2006 1:20 pm    Post subject: Reply with quote

Quote:
if you select linux then you get another screen where you can select the kernel (just one in your case) or it autoboots the kernel.
Actually, i never get to select the kernel. Once I select to boot to linux, that's it. I'm never prompted to choose which kernel I would like to boot.
Back to top
View user's profile Send private message
corsair
Retired Dev
Retired Dev


Joined: 06 Oct 2003
Posts: 451
Location: Aachen, Germany

PostPosted: Thu Aug 17, 2006 6:12 pm    Post subject: Reply with quote

hexadevil wrote:
I don't exactly see how using partition=3 is going to help me. Based on my disk configuration, my root is on sda4, so shouldn't partition be set to 4, not 3?


oh.. I didn't see this post.

I cannot see any partition= line in your yaboot.conf, so please try to add this line. and yes, you are right, should be 4 not 3 :roll:
Back to top
View user's profile Send private message
hexadevil
n00b
n00b


Joined: 14 Apr 2006
Posts: 13

PostPosted: Fri Aug 18, 2006 1:48 pm    Post subject: Reply with quote

So, I've determined why yaboot would not get to the linux kernel option menu - even though its a SATA drive, the OF-speak version of /dev/sda is still hd: not sd:

So, that being said, here is my new "working" yaboot.conf:
Code:
livecd / # cat /etc/yaboot.conf
device=/ht@0,f2000000/pci@7/k2-sata-root@c/k2-sata@0/disk@0:

boot=/dev/sda2
ofboot=hd:2
delay=30
timeout=40
defaultos=macosx
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot


image=/boot/vmlinux
        label=Gentoo Linux
        root=/dev/sda4
        read-only
        partition=4
        append="video=ofonly"


## Change the default colors, fgcolor is the text color, bgcolor is
## the screen background color. (default: fgcolor=white, bgcolor=black)
#fgcolor=black
#bgcolor=green

macosx=/dev/sda5
enablecdboot
enableofboot


Note that i threw in the of-speak device name from ofpath

Now, I get to the kernel selection screen and select my kernel, but it kernel panics with:
Code:
VFS: Cannot open root device "sda4" or unknown-block (8,4)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS:  etc...etc...


So obviously the kernel I built can't mount the filesystem for whatever reason. I must be missing something in my kernel configuration, so here it is, with all the extra junk grep'd out:
Code:
livecd linux # cat .config |grep ^[^#^\ ]
CONFIG_PPC64=y
CONFIG_64BIT=y
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_COMPAT=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
CONFIG_GENERIC_TBSYNC=y
CONFIG_POWER3=y
CONFIG_POWER4=y
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
CONFIG_PPC_STD_MMU=y
CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y
CONFIG_KALLSYMS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SHMEM=y
CONFIG_SLAB=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_KMOD=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_DEFAULT_AS=y
CONFIG_DEFAULT_IOSCHED="anticipatory"
CONFIG_PPC_MULTIPLATFORM=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PMAC64=y
CONFIG_U3_DART=y
CONFIG_MPIC=y
CONFIG_MPIC_BROKEN_U3=y
CONFIG_PPC_970_NAP=y
CONFIG_HZ_250=y
CONFIG_HZ=250
CONFIG_PREEMPT_NONE=y
CONFIG_BINFMT_ELF=y
CONFIG_FORCE_MAX_ZONEORDER=13
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_PROC_DEVICETREE=y
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=ttyS0,9600 console=tty0 root=/dev/sda4"
CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_KERNEL_START=0xc000000000000000
CONFIG_NET=y
CONFIG_INET=y
CONFIG_IP_FIB_HASH=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_BIC=y
CONFIG_LLC=y
CONFIG_ATALK=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_IDE_GENERIC=y
CONFIG_SCSI=y
CONFIG_SCSI_PROC_FS=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_SATA=y
CONFIG_SCSI_SATA_SVW=y
CONFIG_IEEE1394=y
CONFIG_IEEE1394_OHCI1394=y
CONFIG_THERM_PM72=y
CONFIG_WINDFARM=y
CONFIG_NETDEVICES=y
CONFIG_E1000=m
CONFIG_INPUT=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_LIBPS2=y
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_POWERMAC=y
CONFIG_HWMON=y
CONFIG_VIDEO_V4L2=y
CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_MACMODES=y
CONFIG_FB_FIRMWARE_EDID=y
CONFIG_FB_OF=y
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_SPEAKUP_DEFAULT="none"
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
CONFIG_USB_STORAGE=y
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y
CONFIG_USB_MON=y
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_JBD=y
CONFIG_FS_MBCACHE=y
CONFIG_INOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_AUTOFS_FS=y
CONFIG_ISO9660_FS=y
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y
CONFIG_HFSPLUS_FS=y
CONFIG_NFS_FS=y
CONFIG_LOCKD=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SMB_FS=y
CONFIG_CIFS=y
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_UTF8=y
CONFIG_CRC32=y
CONFIG_LOG_BUF_SHIFT=14



I'm not too familiar with the Apple architecture, so I don't know exactly what device drivers I may need that might be missing. Every time I try and lspci or lsmod, I either get nothing (from the livecd) or I get a lot of ambiguous things like "Apple Computer Inc. PCI Host Controller, Apple Computer Inc. blah blah blah" so I never know what drivers I actually need. I was able to determine what SATA driver to build into the kernel based on some dmesg output from the livecd, but beyond that, I'm a novice in trying to figure out what drivers need to be enabled for this beast to work.

So for all of you reading this that are familiar with Apple hardware and the appropriate kernel configurations, here's a little about this Mac:
G5 Tower, Single CPU
1 GB of RAM
nVidia GeForce FX5200
Factory-default SATA hard drive

Is there any additional info that I could provide that would be of help? Please let me know!


Thanks everyone!
Back to top
View user's profile Send private message
corsair
Retired Dev
Retired Dev


Joined: 06 Oct 2003
Posts: 451
Location: Aachen, Germany

PostPosted: Fri Aug 18, 2006 7:51 pm    Post subject: Reply with quote

you seem to miss CONFIG_BLK_DEV_IDE_PMAC.

please compile into your kernel Device Drivers -> ATA/ATAPI/MFM/RLL support -> Buildin PowerMac IDE support. You also want to enable Probe internal ATA/100 (Kauai) first and PowerMac IDE DMA support (the last two are suboptions of Buildin PowerMac IDE support).

regards,

corsair

P.S.: If this also fails you might want to do a make g5_defconfig in your kernel source so you will get a good generic kernel config that should work pretty good on a G5 (just make sure you have the root filesystem compiled in).
Back to top
View user's profile Send private message
hexadevil
n00b
n00b


Joined: 14 Apr 2006
Posts: 13

PostPosted: Tue Aug 22, 2006 6:30 pm    Post subject: Reply with quote

Well, the provided solution didn't get my kernel to boot, but the generic G5 kernel worked just fine, and based on what I want to do with this machine, I'll just keep it that way until I decide to rebuild the kernel with my own setup at some point. Thanks for the help.
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