Tagged command-line

← Back to Homepage

Bootable

Next task: make a bootable USB thumb/stick/drive/thing to rescue a busted machine (In this case, little old Brahms). dkg, as ever, knows what's what and gave me great advice: Bootable USB sticks are just like bootable hard drives for modern computers. Partition them with parted, use mkfs to create a filesystem on them, use grub-install to give them a bootloader, put a kernel and an initial ramfs on them, configure the bootloader to load them, and away you go. He even offered me his filesystem rescue debirf image with the latest 686 kernel from debian unstable.

View Bootable

Blargh, Blimey (continued)

Okay: so I can play DVDs now, but they're choppy. Meanwhile, Ubuntu's System Monitor shows 2.9 GiB of available memory, though I ought to have 4. The bios shows 4. What gives?

View Blargh, Blimey (continued)

Blargh, Blimey, RAM, DVD

Okay, lazyweb: Why can't I play DVDs and why, when I have installed in my computer two RAM modules of 2GiB each, does my computer have 2.9 GiB of the RAMS? Why? On the DVD end, I have installed one million things and gotten from an error in Totem ("no uri handler implemented for dvd") to Totem quietly crashing when I try to play a DVD. VLC spins the disk and then stops. /var/log/messages shows this after trying to run VLC: Dec 13 13:10:02 luna kernel: [10853.901791] sr 1:0:0:0: [sr0] Add. Sense: Media region code is mismatched to logical unit region Dec 13 13:10:02 luna kernel: [10853.906376] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Dec 13 13:10:02 luna kernel: [10853.906386] sr 1:0:0:0: [sr0] Sense Key : Illegal Request [current] Dec 13 13:10:02 luna kernel: [10853.906397] Info fld=0x98d0 Dec 13 13:10:02 luna kernel: [10853.906402] sr 1:0:0:0: [sr0] Add. Sense: Media region code is mismatched to logical unit region

View Blargh, Blimey, RAM, DVD

Lesson Learned

We've got two packages running, OpenX and Phorum, that seem to make a lot of database connections. Sometimes so many that the whole database runs out of connections. Phorum gets hammered by bots looking to exploit vulnerabilities in the code (and sometimes finds them). OpenX is just greedy. Or ...

View Lesson Learned

PDF -> XML -> Calc

Forget for a moment that I'm trying to play like I'm more than a tech. Or recall Joanne this morning in the rain in the garden after Lucia and I collected coconut shells to mark out an area to plant her onions in, "so funny, computers seem like the last thing I'd imagine you working on. You're someone who should be working outside! I can't imagine you not working with plants!" If only she knew. So I have a PDF. PDFedit will convert it to a pretty crappy XML document. A round of non-greedy vim searches: :%s:<font .\{-}>::g :%s:</font>::g :%s: bbox=".\{-}"::g Followed by some attention to the numbers: :%s:period:. :g :%s:comma:,:g :%s:zero:0:g :%s:one:8:g :%s:two:2:g :%s:three:3:g :%s:four:4:g :%s:five:5:g :%s:six:6:g :%s:seven:7:g :%s:eight:8:g :%s:nine:9:g (and a bonus to anyone who can tell me how I totally borked my data with the series above ...) got me a really, really simple XML file of "lines" and "words".

View PDF -> XML -> Calc

You could just use pipes.

Observation: I'm talking about feeding the borg here in a pretty big way. But I don't know that I have it in me to totally DIY this. Right now, when we post a new article, it is up to the editor to go through and identify all the ...

View You could just use pipes.

Whining Works and Waffles

One: kid brother is trying to password protect photos of our nephew. Our nephew. Kid brother did not bear spawn. But he's struggling with htaccess and authentication. Among other things that make it kind of difficult (besides just starting from scratch being difficult) he's stuck with FTP ...

View Whining Works and Waffles

Filesystem Loop Detected

Someone (Hsuan, to be precise, but that isn't the point really) came to me recently with a corrupted SD card. Normally, I don't do corrupted SD cards. I so do not want to be that guy that sits there and fixes what is broke. That doesn't appeal to me at all. But when there is a command line involved, or a real mystery ... I can find it hard to resist. You can see why my career as something other than a widget twiddler is not really taking off. The answer, if you like to skip the narrative (hmph) is photorec. Which actually does amazing things for all manner of data recovery. Here's what I had before me: [0 amanda@stillwell CANON_DC]$ find . -type f find: Filesystem loop detected; `./DCIM/101CANON/101CANON' has the same device number and inode as a directory which is 1 level higher in the filesystem hierarchy. So whatever, PhotoRec. Great. But people always want to know why. I do. So why? Why? David Henry, who I do not know, and yet kind of do know (the internet is sneaky that way) had a pretty good explanation, which I can't really improve on: I was long puzzled by filesystem stuff, until I realized much is done by elves!

View Filesystem Loop Detected

Watching Server Loads

Worth trying: sar -q for a rundown of queue lengths and load averages. Also pstree and I need to sort out what this: I reniced the gzip process with a low priority level to reduce the load it's putting on your server. I'd recommend running these scripts with a +19 ...

View Watching Server Loads

Grumble Grumble Grumble sed Grumble Grumble

What if I had a shitton of ancient shtml files that all, somewhere near the top of the body, contained a line like "BEGIN MAIN CONTENT"? What if I wanted to wipe everything above that and substitute some include script? I'd use sed, right?

View Grumble Grumble Grumble sed Grumble Grumble

← Older

FolioGrid - a Premium Wordpress Theme by FrogsThemes.com