Discussion:
installing Linux thru USB memory key on a PowerBook G4 12" 1.33Ghz
(too old to reply)
Basile Starynkevitch [news]
2005-05-21 07:09:11 UTC
Permalink
Dear All,

I've got a PowerBook 12" G4 (1.33Ghz) on which I ran Debian/Sid for 10
months without problems. Unfortunately, the disk crashed, I replaced
it myself, and broke (by disaligning the slot) the CDROM in the
process. So I have only a USB key (or the network) to install Linux
(and to reformat the new disk).

I'm a software developper [research enginneer] and uses Linux since
end of 1993. I did compile my own kernel on the PowerBook (and I did
have time to backup essential data from the disk before it fully
crashed...)


I would like to install Debian/Sid (using something like a netinstall)
thru a 256Mb USB memory key. Do you have an idea if it is doable? What
I don't know is:

what is the openfirmware sequence to boot from a USB key

how should the key be formatted and organised

what loader should I put on the key

I'm probably able to cross-compile several things (ie the kernel, a
shell, an init, an fdisk, ...) on a Debian/x86

Regards.

PS: I might have posted this previously, but I think I lost the
post. Sorry if I asked several times!
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France
Jack Malmostoso
2005-05-21 08:19:38 UTC
Permalink
Post by Basile Starynkevitch [news]
Do you have an idea if it is doable?
Give a good read to the Sarge Installation Manual, it is weel covered
there:

http://d-i.alioth.debian.org/manual/en.powerpc/ch04s04.html
--
Post by Basile Starynkevitch [news]
I can (well, almost) hear you asking yourselves "why?". Hurd will be
out in a year (or two, or next month, who knows), and I've already got
minix.
Basile Starynkevitch [news]
2005-05-21 19:41:55 UTC
Permalink
A big thanks to JAck for having answered.
Post by Jack Malmostoso
Post by Basile Starynkevitch [news]
Do you have an idea if it is doable?
Give a good read to the Sarge Installation Manual, it is weel covered
http://d-i.alioth.debian.org/manual/en.powerpc/ch04s04.html
A big thanks for the reference. However, I was not successful with it
(probably either because of a faulty hardware, or because I don't
master or understand enough the OpenFirmware).

I followed the above reference, which tell to use the mac-fdisk
utility. Unfortunately, I don't have any working Mac, so I downloaded
this from Debian and compiled it on my x86/PC/Debian, which has the
opposite endianness of PowerPC. I did run it on my PC, but I suppose
that it didn't work well (maybe because of endianness issues?) I also
used the hfsutils commands instead of mounting an HFS filesystem (which
my x86 kernel don't support because I did not compile it in).

I must say that I am not fully sure of what parts of my PowerBook are
working properly and what parts are broken (the CDROM slot is
mechanically broken; the disk is new, and apparently it is powered,
because the part at bottom left of keyboard is usually warm.)

I don't know much about Open Firmware. I am able to boot into it. I'm
getting (I'm copying by hand the powerbook's screen)

Apple PowerBook6,4 4.8.3f1 BootROM built on 04/01/04 at 16:52:05

then a few lines, and at last the ok 0 > prompt

In the same document,
http://d-i.alioth.debian.org/manual/en.powerpc/ch05s01.htm section
5.1.3. Booting from USB memory stick is suggested to type
dev / ls

I'm getting many lines; I'm copying here the few which I guess might
be relevant (the indentation is for OpenFirmware output; non indented
text is my comment). The 256Mb USB memory stick is plugged in, and its
LED is green. I don't have any external USB hub plugged in, and the
only plugged in USB device is my memory stick, which is plugged into
the USB plug near the middle, (nearest to the ethernet connector).


ff88c198: /cpus
... a few lines after
ff8925d0: /packages
...
ff8b1b60: /usb-hid-class
ff8b46c0: /usb-ms-class
...
ff967238: /***@f2000000
... about two dozen lines later (after hitting space to scroll)
ff992e98: /***@1a
ff9f10a0: /***@1
ff9f1250: /***@0
ff9f1370: /***@1
ff9f1488: /***@2
ff99aa38: /***@1b
ff9f0d20: /***@1
... I'm guessing that the firmware detected some USB disk (ie my stick?)
ff9a2630: /***@1b,1
ff9aa228: /***@1b,2
... I'm not sure to understand what these means... (maybe
... partitions??? on the USB stick, but I don't see why...)


The same section suggest typing devalias, which gives many lines. the
lines containing USB are

usb0 /***@f2000000/***@1b,1
usb1 /***@f2000000/***@1b
usb-1a /***@f2000000/@18
usb-1b /***@f2000000/@19
usb-1c /***@f2000000/@1a
usb-2a /***@f2000000/@1b
usb-2b /***@f2000000/@1b,1
usb-2c /***@f2000000/@1b,2

Then the same section says: Having worked out the device path, use a
command like this to boot the installer:

boot usb0/disk:2,\\:tbxi
.... By typing the exact sequence above, I'm getting
can't OPEN: usb0/disk:2,\\:tbxi
Can't open device or file

.... then I tried
boot usb1/disk:2,\\:tbxi
and getting
MAC-PARTS: specified partition is not valid can't OPEN: usb1/disk:2,\\:tbxi

Obviously, something different happen, but the USB key is not what the
PowerBook OpenFirmware expects. I'm guessing an endianness issue...,
and I suppose that the stick was indeed read at this point (but the
read failed, because of bad partition issue).

Does any one have clues on how to "cross-install" Linux, ie how to
prepare a USN key on Linux/x86 to be bootable on PowerPC/OpenFirmware?

Otherwise, is there some exact image of a bootable USB memory stick
somewhere, that I could just copy by running on my x86/Debian/2.6 kernel

dd if=bootable_stick.image of=/dev/uba

(BTW, if someone who have a dozen minutes to spare can run the
commands detailed on http://d-i.alioth.debian.org/manual/en.powerpc/
an publish the exact image of his 128 or 256Mb usb memory stick, I
would be very grateful).

Regards, and a big thanks for all.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France
Loading...