Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Can't get into Linux; Need your help with a ramdisc
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
_savage
Guru
Guru


Joined: 06 Jun 2004
Posts: 304
Location: Redmond, WA

PostPosted: Mon Jun 19, 2006 3:20 am    Post subject: [solved] Can't get into Linux; Need your help with a ramdisc Reply with quote

Ever since the breaking update to udev on a kernel older that 2.6.16 (see here for the thread) I just can't get into my Linux anymore. Thanks to whomever did a real lousy job...

I've got a dual boot TiBook, with an HFS+ OS-X partition, a XFS Linux partition, and an ext3 (journalling) data partition. Linux doesn't boot anymore. The problem now is that my TiBook is about 4 years old and the CD drive seems to have a few issues picking up a recovery CD. I tried 80min and 74min CDs, without any luck. I can't mount either of the other partitions under OS-X because there are now drivers for either file system. So I'm pretty much locked out of my Linux.

Does anybody have an idea how to get a Linux prompt here and copy the missing /sbin/udevstart file back?

I thought about installing VPC for Mac and boot a Linux ISO (does that work?) and then try to mount the Linux XFS partition through VPC (does that work?). Or boot from a USB memory stick (does that work?). Or... anything?

Any idea is more than welcome!

EDIT: network boot works but I don't have the correct disc/kernel (see below).
_________________
Jens Troeger
http://savage.light-speed.de/


Last edited by _savage on Mon Jun 19, 2006 11:36 pm; edited 5 times in total
Back to top
View user's profile Send private message
artakserkso
n00b
n00b


Joined: 01 Jan 2005
Posts: 19

PostPosted: Mon Jun 19, 2006 7:59 am    Post subject: Reply with quote

Try borrowing an external CD reader from someone and then booting a LiveCD in order to copy the missing file back.

Or, as you said, get a distro onto your stick (there are specialized ones for that purpose, google'em up) and boot it.

There are smaller distros too, ones you can boot from a floppy. Use that if booting from a stick is impossible (the BIOS might not support it).

That's it, off the top of my head. :wink:
Back to top
View user's profile Send private message
JoseJX
Developer
Developer


Joined: 28 Apr 2002
Posts: 2773

PostPosted: Mon Jun 19, 2006 11:17 am    Post subject: Reply with quote

You coud also try booting with init=/bin/bb passed to the kernel on boot. This should get you into a console and let you fix things.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
_savage
Guru
Guru


Joined: 06 Jun 2004
Posts: 304
Location: Redmond, WA

PostPosted: Mon Jun 19, 2006 1:47 pm    Post subject: Reply with quote

JoseJX wrote:
You coud also try booting with init=/bin/bb passed to the kernel on boot. This should get you into a console and let you fix things.


Thanks, that worked. But the disc is mounted as read-only filesystem, and without network access I'm still lost. I need to get the file /sbin/udevstart back. Is there a man page or other documentation for /bin/bb? I plugged in the ethernet and it got picked up immediately, but there's no network access.
_________________
Jens Troeger
http://savage.light-speed.de/
Back to top
View user's profile Send private message
JoseJX
Developer
Developer


Joined: 28 Apr 2002
Posts: 2773

PostPosted: Mon Jun 19, 2006 7:34 pm    Post subject: Reply with quote

You need to remount your root filesystem as read-write since it's mounted read-only on boot (the filesystem check then remounts as read-write). You can do this by typing: mount -n -o remount,rw / after booting. bb is just a busybox shell.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
_savage
Guru
Guru


Joined: 06 Jun 2004
Posts: 304
Location: Redmond, WA

PostPosted: Mon Jun 19, 2006 10:11 pm    Post subject: Reply with quote

Ok I've figured out a way, but I need your help here!

I can boot my TiBook over the network, and have a server set up running tftp. So for example, my other Mac runs OS-X, and there I started the tftp daemon, and set up yaboot and (for now) a Debian kernel for netboot:
Code:
> sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist
> ls -la /private/tftpboot
total 13664
drwxr-xr-x   8 root    wheel       272 Jun 19 11:53 .
drwxr-xr-x   6 root    wheel       204 Jun 18 19:42 ..
-rw-r--r--   1 root    wheel   1342776 Jun 19 11:52 initrd.gz
-rw-r--r--   1 root    wheel       998 Jun 19 11:51 initrd.list
drwxr-xr-x   3 root    wheel       102 Jan 20 22:17 private
-rw-r--r--   1 savage  savage  5489028 Jun 19 11:51 vmlinux
-rw-r--r--   1 savage  savage   150052 Jul 11  2004 yaboot
-rw-r--r--   1 root    wheel       270 Jun 19 11:23 yaboot.conf

The kernel and init files can be downloaded here, and the yaboot binary here. Then I boot into the firmware prompt and type
Code:
boot enet:[IP],yaboot

which kicks off the Debian kernel that I just placed in the tftp directory. This works all excellent...

One problem though: this boots the wrong ram disc :( The disc starts the Debian install, which isn't what I want at all. There is a shell escape into ash but that's not much help. I still don't have network access to download the missing udevstart. Worse, the kernel doesn't have the HFS+ driver built in, and so I can't mount my Mac partition and copy udevstart either.

So here's my favor to ask: can somebody please fix me up a ram disc which contains a shell and udevstart (you can download it here), or build me a TiBook kernel with HFS+ drivers built into the kernel? This way I get access to udevstart and copy it back onto my XFS partition. Or does anybody know of a netboot kernel which has XFS and HFS+ built in?

As an alternate solution I'll try to change the ext3/journalling partition to a simple ext2/3 partition such that I can mount that under OS-X and copy what I need over there...

Thanks heaps in advance!
_________________
Jens Troeger
http://savage.light-speed.de/
Back to top
View user's profile Send private message
_savage
Guru
Guru


Joined: 06 Jun 2004
Posts: 304
Location: Redmond, WA

PostPosted: Mon Jun 19, 2006 11:35 pm    Post subject: Reply with quote

Got it :-)

I downloaded the Gentoo CD ISO image, which contains a kernel and a ram disk. They're compiled for CD boot but it's still working. Put them up to the tftp server, rebooted the Mac and then sucked them down through netboot. This booted the Gentoo image, spewed a few error messages, and ended up in a BB prompt. From there I could then mount my XFS partition. Luckily, the ram disk does contain a copy of udevstart, which I copied over to my skrewed Linux install, reboot, and...

...works! My Linux is alive again!
_________________
Jens Troeger
http://savage.light-speed.de/
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