dd to the rescue… again!
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2169 | 17078532 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2169 | 17078668 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:1 |
| 12 | 0.2261 | 17094960 | fread ( ) | ../wp-vimcolor.php:105 |
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2273 | 17093456 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2273 | 17093624 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:3 |
| 12 | 0.2348 | 17095064 | fread ( ) | ../wp-vimcolor.php:105 |
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2355 | 17093396 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2355 | 17093532 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:1 |
| 12 | 0.2430 | 17094956 | fread ( ) | ../wp-vimcolor.php:105 |
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2439 | 17093624 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2439 | 17093812 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:3 |
| 12 | 0.2514 | 17095252 | fread ( ) | ../wp-vimcolor.php:105 |
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2520 | 17093396 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2520 | 17093532 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:1 |
| 12 | 0.2595 | 17094936 | fread ( ) | ../wp-vimcolor.php:105 |
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2604 | 17093396 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2604 | 17093532 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:1 |
| 12 | 0.2679 | 17094936 | fread ( ) | ../wp-vimcolor.php:105 |
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2684 | 17093400 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2684 | 17093540 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:1 |
| 12 | 0.2758 | 17094948 | fread ( ) | ../wp-vimcolor.php:105 |
| ( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0001 | 53076 | {main}( ) | ../index.php:0 |
| 2 | 0.0002 | 56516 | require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' ) | ../index.php:17 |
| 3 | 0.1710 | 16858956 | require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' ) | ../wp-blog-header.php:16 |
| 4 | 0.1725 | 16921536 | include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/single.php' ) | ../template-loader.php:43 |
| 5 | 0.2075 | 17040700 | the_content( ) | ../single.php:16 |
| 6 | 0.2076 | 17046032 | apply_filters( ) | ../post-template.php:169 |
| 7 | 0.2169 | 17060316 | call_user_func_array ( ) | ../plugin.php:166 |
| 8 | 0.2169 | 17060500 | vim_color( ) | ../plugin.php:0 |
| 9 | 0.2169 | 17060836 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 10 | 0.2768 | 17094540 | preg_replace ( ) | ../wp-vimcolor.php:143 |
| 11 | 0.2768 | 17095028 | vimcolor_process_color( ) | ../wp-vimcolor.php(143) : regexp code:6 |
| 12 | 0.2845 | 17097088 | fread ( ) | ../wp-vimcolor.php:105 |
On my laptop (a macbook), I dual boot between Mac OS X and Gentoo.
Up to last week I only booted into Mac OS X once a month to see if there were
any firmware updates (which only come in .dmg archives), so in fact I was
single booting Gentoo.
Last week, of course in front of a customer, grub failed for no apparent reason.
I just shut down my laptop cleanly in the morning and in the afternoon it
didn’t want to work any more. Luckily, I could still boot into Mac OS X, so
not all was lost.
When I realised that I couldn’t access my Linux partitions from within Mac OS
X (due to imcompatible partitioning scheme types (GPT <vs> MBR)), I knew this
problem wouldn’t be that easy to fix, especially because of this extra
handicap: no CD-drive to boot a Linux rescue CD from. I had the same DVD stuck
into my macbooks internal superdrive for over 4 months (yes, Thomas, this was your qeimc DVD :-p). After having it surgically
removed by S&S they told me I would never be
able to use my internal superdrive again, because the drive itself got
displaced so it doesn’t fit with the opening in the casing any more.
Another thing I suddenly realised was that I did have good backups of all my
data… but not of my working environment (/etc, dotfiles, $HOME/bin, …).
That made me really want to get my Gentoo working again.
First try: boot into a rescue system. I tried with two bootable USB disks,
which work nicely on another PC at the office. My macbook choked on both with a nice
“boot error”.
Second try was at Barcamp.
Thomas (another one) was so kind to bring along an
external firewire cd drive, so I could boot into a resuce system and fix my
grub. No candy. I sure got the live CDs (tried multiple ones) in my rEFIt boot manager, but actually booting from
one was too hard a task for mr. macbook.
Third try: to the rescue! Here’s what I did.
Disk: /dev/rdisk0 geometry: 9729/255/63 [156301488 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
1: EE 0 0 2 - 25 127 14 [ 1 - 409639] <Unknown ID>
2: AF 25 127 15 - 1023 254 63 [ 409640 - 60817408] HFS+
3: 83 1023 254 63 - 1023 254 63 [ 61227048 - 54685260] Linux files*
*4: 83 1023 254 63 - 1023 254 63 [ 115912308 - 40384077] Linux files*
I knew the start and size columns were expressed in sectors.
Then there’s . I knew I needed something like
The manual explains that works with 512-byte blocks. So I
only needed to figure out what the relation was between 512-byte blocks and
sectors. told me just that!
Filesystem 512-blocks Used Avail Capacity Mounted on /dev/disk0s2 60817408 54925160 5380248 91% /
Seems like partition disk0s2 has 60817408 512-byte blocks and 60817408
sectors. Therefore 1 sector = 1 512-byte block.
The manual also told me that the start-column is 0-based
and the size-column 1-based. Bringing all this together brought me to
and yup… these dd images on elisa (another PC on our network) are
loop-mountable.
Okay, my laptop isn’t fixed yet, but now at least I can try out some things
without having to fear losing all my precious stuff! :-)