Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I lost yaboot!

17 views
Skip to first unread message

Petris Dimitrios

unread,
Jun 7, 2006, 6:10:15 PM6/7/06
to

Hello there,

 

I have a powerbook G4 and debian installed on it. I recently lost my yaboot bootloader and it starts automatically with osx. Does anyone know how to restore the bootloader without losing any data?

 

Thanks.

Sven Luther

unread,
Jun 7, 2006, 6:30:17 PM6/7/06
to

Boot into the box with d-i, when it reaches the partitioning stage, go to
console 2, mount your root partition, chroot into it, mount /proc and /sys,
check your yaboot.conf and rerun ybin.

This should mostly do it, but YMMV.

Friendly,

Sven Luther


--
To UNSUBSCRIBE, email to debian-powe...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Felix C. Stegerman

unread,
Jun 7, 2006, 6:40:22 PM6/7/06
to
* Petris Dimitrios <p...@venus.cslab.aueb.gr> [2006-06-07 18:57]:

> I have a powerbook G4 and debian installed on it. I recently lost my
> yaboot bootloader and it starts automatically with osx. Does anyone
> know how to restore the bootloader without losing any data?

If you still have a working yaboot.conf, you can boot from an install
CD or a Live CD (I usually use a Ubuntu Live CD), chroot into your
system and just run `ybin -v`. Otherwise, assuming you didn't get
into this trouble by having a bad yaboot.conf in the first place, you
might be able to extract your yaboot.conf from the boot partition. If
you need any help with any of this, all you have to do is ask ;-)


- Felix

--
Felix C. Stegerman <f...@obfusk.net> http://obfusk.net
~ "Any sufficiently advanced bug is indistinguishable from a feature."
~ -- R. Kulawiec
~ vim: set ft=mail tw=70 sw=2 sts=2 et:

Peter Voigt

unread,
Jun 8, 2006, 3:00:12 AM6/8/06
to

Am 08.06.2006 um 00:35 schrieb Felix C. Stegerman:

> * Petris Dimitrios <p...@venus.cslab.aueb.gr> [2006-06-07 18:57]:
>> I have a powerbook G4 and debian installed on it. I recently lost my
>> yaboot bootloader and it starts automatically with osx. Does anyone
>> know how to restore the bootloader without losing any data?
>
> If you still have a working yaboot.conf, you can boot from an install
> CD or a Live CD (I usually use a Ubuntu Live CD), chroot into your
> system and just run `ybin -v`. Otherwise, assuming you didn't get
> into this trouble by having a bad yaboot.conf in the first place, you
> might be able to extract your yaboot.conf from the boot partition. If
> you need any help with any of this, all you have to do is ask ;-)

You can use a debian-installer-cd too.

Go through the normal install-process until the point, where the
question appears, how to use the disk (use whole disk or manuall
partition). At that stage: DO NOT PARTITION YOUR DISC.

Change to the second console, make the needed mount-directories
(mkdir), mount the debian-partition's appropiate, chroot into the
debian-root-partition, mount /proc, run sbin (you need the complete
path to sbin) and that' all. Umount /proc, exit chroot, reboot.

Bye
Peter Voigt

Petris Dimitrios

unread,
Jun 8, 2006, 8:40:06 AM6/8/06
to
I boot with my installation cd and when I when reached the partitioning
stage I went to console 2 and tried to mount my root partition. However it
seems that I am not doing something right. I created a dir and tried to
mount the /dev/hda2 partition (which is my root) but it says falied!

Help!

Peter Voigt

unread,
Jun 8, 2006, 9:20:10 AM6/8/06
to

Am 08.06.2006 um 14:15 schrieb Petris Dimitrios:

> I boot with my installation cd and when I when reached the
> partitioning
> stage I went to console 2 and tried to mount my root partition.

What looks your mount-command like and what was the exact text of the
error-message?

Bye
Peter voigt

Petris Dimitrios

unread,
Jun 8, 2006, 9:50:09 AM6/8/06
to
________________________________

Επισκεφθείτε το Venus - Την On-line κοινότητα φοιτητών Πληροφορικής του
Ο.Π.Α.

-----Original Message-----
From: Peter Voigt [mailto:peter....@gmx.net]
Sent: Thursday, June 08, 2006 4:13 PM
To: Petris Dimitrios
Cc: 'Sven Luther'; debian-...@lists.debian.org
Subject: Re: I lost yaboot!

Bye
Peter voigt

__________ NOD32 1.1586 (20060608) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

Petris Dimitrios

unread,
Jun 8, 2006, 10:00:23 AM6/8/06
to
Sorry fir the previous empty message, just ignore it.

The command is : mount /dev/hda2/ /new_dir
And the output is : mount /dev/hda2/ /new_dir failed. No such file or
directory
________________________________

Επισκεφθείτε το Venus - Την On-line κοινότητα φοιτητών Πληροφορικής του
Ο.Π.Α.

-----Original Message-----
From: Peter Voigt [mailto:peter....@gmx.net]
Sent: Thursday, June 08, 2006 4:13 PM
To: Petris Dimitrios

Cc: 'Sven Luther'; debian-...@lists.debian.org
Subject: Re: I lost yaboot!

Bye
Peter voigt

__________ NOD32 1.1586 (20060608) Information __________

Roger Leigh

unread,
Jun 8, 2006, 10:30:09 AM6/8/06
to
"Petris Dimitrios" <p...@venus.cslab.aueb.gr> writes:

Another alternative is to boot into OpenFirmware (Command-Option-O-F)
and manually set the boot device:

First, to load yaboot, try:

0 > boot hd:2,yaboot

(for /dev/hda2). If that doesn't work, you can:

printenv boot-device

This will tell you the current device. Write it down in case
something gets screwed up!

0 > setenv boot-device=/pci@f4000000/ata-6@d/disk@0:2,\\:tbxi
or
0 > setenv boot-device=hd:2,\\:tbxi

0 > mac-boot

This is for yaboot on /dev/hda2 on my Mac Mini. Check what your
current settings are, and adjust appropriately.

OF is fairly easy, other than the stupidly long pathnames. "help" is
a good command to start with.

See
http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/ch9.en.shtml
for other recovery instructions...


Regards,
Roger

--
Roger Leigh
Printing on GNU/Linux? http://gutenprint.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.

Sven Luther

unread,
Jun 8, 2006, 10:50:08 AM6/8/06
to
On Thu, Jun 08, 2006 at 03:15:22PM +0300, Petris Dimitrios wrote:
> I boot with my installation cd and when I when reached the partitioning
> stage I went to console 2 and tried to mount my root partition. However it
> seems that I am not doing something right. I created a dir and tried to
> mount the /dev/hda2 partition (which is my root) but it says falied!

PLease provide the output of /proc/partitions, or the dmesg lines for your
disk, as well as the output of the print command of parted.

Sven Luther

unread,
Jun 8, 2006, 10:50:09 AM6/8/06
to
On Thu, Jun 08, 2006 at 04:21:08PM +0300, Petris Dimitrios wrote:
> Sorry fir the previous empty message, just ignore it.
>
> The command is : mount /dev/hda2/ /new_dir
> And the output is : mount /dev/hda2/ /new_dir failed. No such file or
> directory

try a mkdir /new_dir ?

Friendly,

Sven Luther

Peter Voigt

unread,
Jun 8, 2006, 10:50:15 AM6/8/06
to

Am 08.06.2006 um 16:02 schrieb Roger Leigh:

> "Petris Dimitrios" <p...@venus.cslab.aueb.gr> writes:
>
>> I have a powerbook G4 and debian installed on it. I recently lost
>> my yaboot
>> bootloader and it starts automatically with osx. Does anyone know
>> how to
>> restore the bootloader without losing any data?
>
> Another alternative is to boot into OpenFirmware (Command-Option-O-F)
> and manually set the boot device:
>
> First, to load yaboot, try:
>
> 0 > boot hd:2,yaboot

As to my knowlegde, you have to use

boot hd:2,\ofboot.b

because "ofboot.b" is the linux-bootloader of a new world powerpc
(tested on mac mini with debian testing) and "\" is the correct sign
for "/" on the open firmware level.

Please notice one point. You have to use the new world boot-
partition, which is not "/" and not "/boot" of your debian-
installation. If hd:2, is not your new world boot-partition, please
change this path.

Bye
Peter Voigt

Michael Schmitz

unread,
Jun 8, 2006, 12:00:18 PM6/8/06
to
> > The command is : mount /dev/hda2/ /new_dir
> > And the output is : mount /dev/hda2/ /new_dir failed. No such file or
> > directory
>
> try a mkdir /new_dir ?

Or /dev/hda2 instead of /dev/hda2/ ??

Michael

Petris Dimitrios

unread,
Jun 9, 2006, 6:00:22 AM6/9/06
to
I ve made the directory new_dir but it seems that /dev/hda2 does not exist.
Where are the partitios stored so that I can mpount them? The
proc/partitions has all the partitions on thw disc but I cannot find the
devices.


-----Original Message-----
From: Sven Luther [mailto:sven....@wanadoo.fr]

Sent: Thursday, June 08, 2006 5:43 PM
To: Petris Dimitrios
Cc: 'Peter Voigt'; debian-...@lists.debian.org
Subject: Re: I lost yaboot!

Sven Luther

unread,
Jun 9, 2006, 6:00:28 AM6/9/06
to
On Fri, Jun 09, 2006 at 12:32:48PM +0300, Petris Dimitrios wrote:
> I ve made the directory new_dir but it seems that /dev/hda2 does not exist.
> Where are the partitios stored so that I can mpount them? The
> proc/partitions has all the partitions on thw disc but I cannot find the
> devices.

You are using sarge d-i, right ? Please use the etch beta2 d-i, or use a devfs
style partition name. Look at /proc/disks for detail, i think.

Sven Luther

unread,
Jun 9, 2006, 6:40:08 AM6/9/06
to
On Fri, Jun 09, 2006 at 01:22:49PM +0300, Petris Dimitrios wrote:
> In dev/discs it has a disc0 dir. I get into it and it directs me into
> /dev/ide/host0/bus0/target0/lun0/ where are placed files named : part part1
> part2 ... part8.
> I tried to mount one of them but it gave the same error as before.
>
> PS.I have the sarge d-i and I can't download the beta2 at this time.

Did you try running parted, and what did it tell you about the filesystems on
your disk ? did you create the mount point as i asked you ?

Petris Dimitrios

unread,
Jun 9, 2006, 6:50:06 AM6/9/06
to
In dev/discs it has a disc0 dir. I get into it and it directs me into
/dev/ide/host0/bus0/target0/lun0/ where are placed files named : part part1
part2 ... part8.
I tried to mount one of them but it gave the same error as before.

PS.I have the sarge d-i and I can't download the beta2 at this time.

________________________________

Επισκεφθείτε το Venus - Την On-line κοινότητα φοιτητών Πληροφορικής του
Ο.Π.Α.

-----Original Message-----
From: Sven Luther [mailto:sven....@wanadoo.fr]
Sent: Friday, June 09, 2006 12:57 PM
To: Petris Dimitrios
Cc: debian-...@lists.debian.org
Subject: Re: I lost yaboot!

Friendly,

Sven Luther

__________ NOD32 1.1588 (20060609) Information __________

Petris Dimitrios

unread,
Jun 9, 2006, 7:00:19 AM6/9/06
to
I just run parted!How can I mount the root partition now? It has various
commands but none of them is about mounting a partition.


-----Original Message-----
From: Sven Luther [mailto:sven....@wanadoo.fr]
Sent: Friday, June 09, 2006 1:32 PM
To: Petris Dimitrios
Cc: 'Sven Luther'; debian-...@lists.debian.org
Subject: Re: I lost yaboot!

Friendly,

Sven Luther

__________ NOD32 1.1588 (20060609) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

--

Sven Luther

unread,
Jun 9, 2006, 7:10:14 AM6/9/06
to
On Fri, Jun 09, 2006 at 01:40:17PM +0300, Petris Dimitrios wrote:
> I just run parted!How can I mount the root partition now? It has various
> commands but none of them is about mounting a partition.

Use the print command, and paste me here the output (or the important part).

Did you make sure the mount point is created ?

Sven Luther

unread,
Jun 9, 2006, 7:30:21 AM6/9/06
to
On Fri, Jun 09, 2006 at 02:17:58PM +0300, Petris Dimitrios wrote:
> Print:
>
> Minor Start End FS Name Flags
> 1 Apple
> 2 hfs bootstrap boot
> 4 reizerfs debian
> 6 linux-swap swap swap
> 3 hfs+ Apple_HFS...
> 5 hfs+ Apple_HfS...
>
> Yes I have created the /new_dir!

So, your partition would be :

4 reizerfs debian

and you need to :

mount /proc/disks/.../part4 /new_dir

Petris Dimitrios

unread,
Jun 9, 2006, 7:40:15 AM6/9/06
to
Print:

Minor Start End FS Name Flags
1 Apple
2 hfs bootstrap boot
4 reizerfs debian
6 linux-swap swap swap
3 hfs+ Apple_HFS...
5 hfs+ Apple_HfS...

Yes I have created the /new_dir!

-----Original Message-----
From: Sven Luther [mailto:sven....@wanadoo.fr]
Sent: Friday, June 09, 2006 2:03 PM
To: Petris Dimitrios
Cc: 'Sven Luther'; debian-...@lists.debian.org
Subject: Re: I lost yaboot!

Friendly,

Sven Luther

__________ NOD32 1.1588 (20060609) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

--

Petris Dimitrios

unread,
Jun 9, 2006, 8:00:22 AM6/9/06
to
I managed to mount it! Thanx

I went into the sbin dir. The ybin command says not fount!


-----Original Message-----
From: Sven Luther [mailto:sven....@wanadoo.fr]
Sent: Friday, June 09, 2006 2:25 PM
To: Petris Dimitrios
Cc: 'Sven Luther'; debian-...@lists.debian.org
Subject: Re: I lost yaboot!

4 reizerfs debian

and you need to :

mount /proc/disks/.../part4 /new_dir

Friendly,

Sven Luther

__________ NOD32 1.1588 (20060609) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

--

Sven Luther

unread,
Jun 9, 2006, 8:10:20 AM6/9/06
to
On Fri, Jun 09, 2006 at 02:37:46PM +0300, Petris Dimitrios wrote:
> I managed to mount it! Thanx
>
> I went into the sbin dir. The ybin command says not fount!

Ah, there someone else should help you, i am no yaboot/powermac expert.

Peter Voigt

unread,
Jun 9, 2006, 8:30:20 AM6/9/06
to

Am 09.06.2006 um 13:37 schrieb Petris Dimitrios:

> I went into the sbin dir. The ybin command says not fount!

Did you try

"/usr/sbin/ybin"

after chrooting into /dev/disc0/..... ?

Friendly,

Peter Voigt

Petris Dimitrios

unread,
Jun 9, 2006, 9:00:22 AM6/9/06
to
It says that it cannot find yaboot.conf: using default
Cannot write nvram

Now what?


PS. Sorry for asking so many questions! But I am a bit of newbe to linux in
ppcs.


-----Original Message-----
From: Peter Voigt [mailto:peter....@gmx.net]

Sent: Friday, June 09, 2006 3:25 PM
To: Petris Dimitrios
Cc: debian-...@lists.debian.org
Subject: Re: I lost yaboot!

Did you try

"/usr/sbin/ybin"

Friendly,

Peter Voigt

__________ NOD32 1.1588 (20060609) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

--

Daniel Gimpelevich

unread,
Jun 12, 2006, 1:40:06 AM6/12/06
to
On most (but not all) models that use yaboot, you don't need to bother
with a LiveCD or d-i to restore a lost yaboot. Just boot with the Option
key and yaboot should be an option. A different method can work depending
not on the model, but on your partition layout, and that is to zap the
PRAM (Cmd-Opt-P-R). Since you have already pasted your parted output, I
can tell you that this second method WILL work for you, guaranteed. No
mounting, no chroot, no ybin necessary, unless of course you already
messed everything up by overwriting your bootstrap partition with ybin
from d-i.

On Fri, 09 Jun 2006 16:34:26 +0300, Petris Dimitrios wrote:

> It says that it cannot find yaboot.conf: using default
> Cannot write nvram
>
> Now what?
>
>
> PS. Sorry for asking so many questions! But I am a bit of newbe to linux in
> ppcs.
>
>
> -----Original Message-----
> From: Peter Voigt [mailto:peter....@gmx.net]
> Sent: Friday, June 09, 2006 3:25 PM
> To: Petris Dimitrios
> Cc: debian-...@lists.debian.org
> Subject: Re: I lost yaboot!
>
>

Petris Dimitrios

unread,
Jun 12, 2006, 3:10:09 AM6/12/06
to
A million thanks !!!!!!!!!! The "Cmd-Opt-P-R" solution worked just perfect!
Thanks again everyone for the understanding and all the help!

__________ NOD32 1.1592 (20060611) Information __________

0 new messages