Monday, August 9, 2010

Debian on MacMiniG4

I finally manage to get the debian-installer to work !

Steps:

$ wget http://cdimage.debian.org/debian-cd/5.0.5/powerpc/iso-dvd/debian-505-powerpc-DVD-1.iso
--2010-08-09 14:34:09--  http://cdimage.debian.org/debian-cd/5.0.5/powerpc/iso-dvd/debian-505-powerpc-DVD-1.iso
Resolving cdimage.debian.org... 130.239.18.173, 130.239.18.163, 2001:6b0:e:2018::163, ...
Connecting to cdimage.debian.org|130.239.18.173|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://caesar.acc.umu.se/debian-cd/5.0.5/powerpc/iso-dvd/debian-505-powerpc-DVD-1.iso [following]
--2010-08-09 14:34:09--  http://caesar.acc.umu.se/debian-cd/5.0.5/powerpc/iso-dvd/debian-505-powerpc-DVD-1.iso
Resolving caesar.acc.umu.se... 130.239.18.142, 2001:6b0:e:2018::142
Connecting to caesar.acc.umu.se|130.239.18.142|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4698593280 (4.4G) [application/octet-stream]
Saving to: `debian-505-powerpc-DVD-1.iso'

100%[================================================================================================================================>] 4,698,593,280 1.29M/s   in 55m 13s

2010-08-09 15:29:22 (1.35 MB/s) - `debian-505-powerpc-DVD-1.iso' saved [4698593280/4698593280]


Then using k3b, just open the iso image, burn onto a SONY DVD+R 4.7GB/120min AccuCORE. Apparently this is a bad idea to check "Verify written data", this leads to the following error:


Anyway using this DVD, just go back to your MacMiniG4, reboot, press the Option key during reboot, wait ... and finally it should display a cute pinguin logo, next to the mac hard drive.

Conclusion:
- CDROM does NOT work (I tried sarge 31r8, lenny 504, lenny 505 on different cd-r and cd-rw)
- I could never get USB to boot

Solution: just get the dvd iso, toat it, it works !

Warning: during installation I choose "use LVM on whole disk", when you press next you should get:

No NewWorld boot partition was found. The yaboot boot loader requires an Apple_Bootstrap 
partition of at least 819200 bytes in size, using the HFS Macintosh file system.

Simply ignore this message (press 'No').

I could also find this problem on another post:

http://www.macfreek.nl/mindmaster/Debian_on_PowerBookG4

It seems this guy, also had issue booting from a cdrom / usb !

References to the whole story:
- http://lists.debian.org/debian-powerpc/2010/07/msg00097.html
- http://malatsblog.blogspot.com/2010/07/preparing-bootable-debian-installer-cd.html

Friday, July 30, 2010

Still struggling with cmake/git

  cd CMake
  git checkout master
  git pull
  git checkout -b fix-issue-9611
  cp ~/tmp/cmake-2.8.2/Modules/FindJNI.cmake Modules/FindJNI.cmake
  git add --  Modules/FindJNI.cmake
  git commit -m"BUG: 0009611 Fix Arch independent FindJNI.cmake on Linux to support Sun Java, OpenJDK, Kaffe and GCJ paths. Based on patch from debian"
  git checkout -b next origin/next
  git checkout next
  git pull
  git merge  fix-issue-9611
  git push
Counting objects: 15, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.58 KiB, done.
Total 8 (delta 6), reused 0 (delta 0)
----------------------------------------------------------------------
commit 6a3d7d46 has an invalid message:
  the first line must not be more than 78 characters
commit message is:
BUG: 0009611 Fix Arch independent FindJNI.cmake on Linux to support Sun Java, OpenJDK, Kaffe and GCJ paths. Based on patch from debian
----------------------------------------------------------------------
error: hook declined to update refs/heads/next
To git@cmake.org:cmake.git
 ! [remote rejected] next -> next (hook declined)
error: failed to push some refs to 'git@cmake.org:cmake.git'

Tuesday, July 27, 2010

Preparing bootable debian-installer CD for MacMini/PPC

Here is a follow up on my quest to get a proper bootable CD of debian-installer for my PPC MacMini.



$ wodim  -eject -v speed=2 -data -pad  ./debian-505-powerpc-netinst.iso
wodim: No write mode specified.
wodim: Asuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.Device was not specified. Trying to find an appropriate drive...
Looking for a CD-R drive to store 199.59 MiB...
Detected CD-R drive: /dev/cdrw
Using /dev/cdrom of unknown capabilities
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.9
Driveropts: 'burnfree'
SCSI buffer size: 64512
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   :
Vendor_info    : 'HL-DT-ST'
Identification : 'DVD+-RW GH30N   '
Revision       : 'A102'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0009 (CD-R)
Profile: 0x0012 (DVD-RAM)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R)
Profile: 0x001A (DVD+RW)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1114112 = 1088 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
Drive DMA Speed: 126494 kB/s 718x CD 91x DVD
FIFO size      : 12582912 = 12288 KB
Track 01: data   199 MB         padsize:   30 KB
Total size:      229 MB (22:42.73) = 102205 sectors
Lout start:      229 MB (22:44/55) = 102205 sectors
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 4
  Is not unrestricted
  Is not erasable
  Disk sub type: Medium Type A, low Beta category (A-) (2)
  ATIP start of lead in:  -12508 (97:15/17)
  ATIP start of lead out: 359845 (79:59/70)
Disk type:    Short strategy type (Phthalocyanine or similar)
Manuf. index: 22
Manufacturer: Ritek Co.
Blocks total: 359845 Blocks current: 359845 Blocks remaining: 257640
Speed set to 2822 KB/s
Starting to write CD/DVD at speed  16.0 in real TAO mode for single session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01:  199 of  199 MB written (fifo 100%) [buf  91%]  16.8x.
Track 01: writing  30 KB of pad data.
Track 01: Total bytes read/written: 209281024/209311744 (102203 sectors).
Writing  time:   94.845s
Average write speed  14.4x.
Min drive buffer fill was 90%
Fixating...
Fixating time:   18.573s
wodim: fifo had 3297 puts and 3297 gets.
wodim: fifo was 0 times empty and 3069 times full, min fill was 95%.

Let's try checking the iso was burned ok:

$ cmp /dev/cdrom debian-505-powerpc-netinst.iso
cmp: EOF on debian-505-powerpc-netinst.iso

I followed instructions from:
http://www.debian.org/CD/faq/#record-unix

Still no luck using:
- C reboot solution
- Option solution
- Command+Option+o+f solution

Friday, July 23, 2010

API Sanity Autotest

I just discover today a neet tool to detect API/ABI change in shared C/C++ libraries:

http://ispras.linux-foundation.org/index.php/API_Sanity_Autotest

This is used at:

http://linuxtesting.org/upstream-tracker/

I think I need to compare that to the other one I had in mind:

http://ispras.linux-foundation.org/index.php/ABI_compliance_checker

Friday, June 18, 2010

-B/usr/lib/gold-ld

Linker selection: ld is used by default, to use the gold linker, pass -fuse-linker-plugin (no other side effects if -flto/-fwhopr is not passed). To force ld.bfd or ld.gold, pass -B/usr/lib/compat-ld for ld.bfd or /usr/lib/gold-ld for ld.gold.

ref:
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556126

Tuesday, June 15, 2010

sshd[21670]: Authentication refused: bad ownership or modes for directory /home/malat

I was struggling to ssh without password (luckily ssh works when password is passed).

Looking at the log I got the info:

$ sudo tail -f auth.log
Jun 15 16:58:12 example sshd[21654]: pam_unix(sshd:session): session closed for user malat
Jun 15 16:58:16 example sudo: malat : TTY=pts/0 ; PWD=/home/malat/.ssh ; USER=root ; COMMAND=/sbin/ifconfig
Jun 15 16:59:10 example sshd[21670]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 16:59:10 example sshd[21670]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 16:59:14 example sshd[21673]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 16:59:14 example sshd[21673]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 17:01:03 example sshd[21686]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 17:01:03 example sshd[21686]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 17:01:40 example sshd[21691]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 17:01:40 example sshd[21691]: Authentication refused: bad ownership or modes for directory /home/malat
Jun 15 17:02:09 example sudo: malat : TTY=pts/0 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/tail -f auth.log

This lead to:

* http://sial.org/howto/openssh/publickey-auth/problems

The solution was simply:

server$ chmod go-w ~/
server$ chmod 700 ~/.ssh
server$ chmod 600 ~/.ssh/authorized_keys