LinuxSoftware

Coding and tramping in Aotearoa / New Zealand


Feb 24

Queenstown to Shelter Rock Hut

, , , david, Sunday, 8:11 pm

There was heavy rain last night. I lay listening to it in the Queenstown YHA wondering if I’d be able to do the walk, but in the morning it was clear. Caught the transport to Glenorchy and then on to Muddy Creek. Met Warwick and Claire from Melbourne and also four Dutch trampers who are doing the walk too. Beautiful fine weather for the walk in. 25 Mile creek was up to my knees, but no problem. Lunch was pita bread, hummus, tomatoes. Rain started just as I got to Shelter Rock Hut. Had soup, and pita bread, hummus, and cheese when I got to the hut which filled me up and was all I needed for dinner, slept, read, slept.

IMG_1337
IMG_1338
IMG_1341
IMG_1342
IMG_1343
IMG_1345
IMG_1346
IMG_1347

Feb 23

Going South

, , , david, Saturday, 12:34 pm

There is a rain warning for Southern Lakes, but talking to DoC I hear it hasn’t started raining yet. I’m keeping my track transport booking as tomorrow, but have changed to come out on Friday 29. This will give me an extra day up my sleve to deal with bad weather. Tomorrow I will just see what the conditions are like. There are several other people booked in the van going to the Rees tomorrow so maybe we can do the 25 Mile Creek crossing together.


Feb 19

New Pack

, , , , , david, Tuesday, 9:44 pm

Bought a new pack – a Vardo from Kathmandu (review). My old Fairydown Endeavour has served faithfully for the past 25 years, but I’m told modern harnesses are much more comfortable. I was thinking I’d buy the latest Osprey or Macpac model, but even with Michael’s help I couldn’t get them adjusted comfortably. In the end I found the cheaper more traditional Kathmandu pack fit best.

vardo
New Pack
endeavour
Old Pack

Feb 16

Long term tramping goal – The Dusky

We canceled our climb of Ruapehu this weekend. The weather was not good. Snow, rain, gales and a freezing level about 2500 metres. Hopefully it will be OK for my Rees-Dart tramp in the South Island next week.

I’ve been looking at these purtty track books, my sister left at my flat, which are inspiring.

Classic Tramping in New Zealand, by Shaun Barnett and Rob Brown, ISBN 0908802 51X Bird's Eye Guide Tramping in New Zealand, by  Shaun Barnett, ISBN 1-877333-51-4

I now have a new long term goal: to tramp the Dusky. I’ve thought about this before, but was disinclined by the stories of the clouds of sandflies, mud, and rain, plus having planes flying across the track everyday will destroy the feeling of remoteness. But having looked at the pictures I’m hooked again.

It’s a hard 8 day track (though I heard some whole families do it) which I’ll have to work up to, but maybe next year. I’d also like to return to Stewart Island and include the side trip up Mt Anglem/Hananui this time. The most difficult thing with these plans is finding someone to look after my cat.


Feb 12

Wiped my MBR

, , , , , david, Tuesday, 7:56 am

At work yesterday I wiped the Master Boot Record off my dev machine. That’s the danger of testing disk utilities on the dev machine. It was good I noticed what I had done because while Linux is running it doesn’t need the MBR, but upon reboot everything will be nasty. Hopefully my solution will be useful to anyone else who deletes their MBR.

/proc/partitions holds the kernel’s view of the partitions, but it only lists the size of each partition and it uses units of kernel blocks (which are normallly 1K). The tools to recreate the MBR (fdisk/sfdisk/parted) require start and finish and none of them take blocks as a unit (parted can do cylinders, sectors, MB, GB, but not blocks). It is possible to guess/calculate the start and finish for each partition and convert the units, but when you’ve corrupted your hard drive and have one chance of restoring it before rebooting you don’t want to be doing a lot of arithmetic.

A better solution I’ve discovered is hdparm -g. This will display the size in sectors (which we can use) of a device, and the starting offset (in sectors) of the device from the beginning of the drive. So starting with hdparm -g /dev/sda1 and working through all the partitions I had lost I recorded the start and size of each partition. The finish was the fairly simple calculation of start+size-1, (except for the extended partition described below).

I used parted to recreate the partitions.
The commands I used were:
mklabel msdos, to create a new partition table
unit s, to set the units to sectors
then I was able to use the mkpart command with the start and finish for each partition. Parted does a pretty good job of guessing what the filesystem of each partition is, so I didn’t need to specify that.
mkpart pri 63 61432559
mkpart pri 61432560 122865119
mkpart pri 122865120 135154844

The extended partition has a size of only one sector, but finishes at the end of the drive. To recreate it I switched over to the GUI gparted to make sure it went all the way to the end, just because it was easier than looking up the last sector of the disk. Then I went back to parted for the logical partitions.
mkpart logical 135154908 237553154
mkpart logical 237553218 270165104

Then I realized it wasn’t just partition table I’d deleted, but the whole MBR including GRUB (GRand Unified Bootloader). I reinstalled that with grub-install /dev/sda.

When I rebooted my /home partition was a bit messed up, but running fsck /dev/sda5 on it fixed the few things which had gone wrong. And then my machine was back up.


« Previous PageNext Page »