linux

stupid splash screen!

Submitted by rogueclown on Fri, 10/21/2011 - 07:46

i've done a lot of netbooting-related stuff at work. a *lot*. i could probably talk your ear off about PXE, WDS, and a million other bits of netboot-related jargon in my sleep.

however, there was one quirk with Ubuntu that was driving me crazy. Ubuntu Server 10.10 and before worked flawlessly. however, starting with Natty Narwhal, i'd do a netboot install that would proceed as normal...until i booted into the system. at that point, i couldn't actually see anything on the screen. it was clear the computer was booting: it would go through the BIOS, and only stop displaying video when it went into the operating system. i was stumped.

this happened on any machine i tried the netboot install on: Dell, Supermicro, HP, no-name, you name it. it happened on new machines and old machines. it always happened. i googled and googled with no luck, and finally just forsook netboot installs of Natty in favour of burning discs.

Oneiric Ocelot came out earlier this month, and i was hoping this problem would be fixed. i put it up on the PXE server, and no dice. i was annoyed, but i was determined. i cast a wider net in my search for a solution, looking at more general forum threads about Ubuntu video issues, since limiting it to just netboot install advice was getting me nowhere.

finally, i figured out the problem, and how to get around it. the problem was that trying to display the splash screen was completely borking the virtual terminal. (i figured this out because, when i hit Ctrl-Alt-F2 on one of the "hosed" installs, that virtual terminal came up just fine.) the problem can be avoided by preseeding the Ubuntu install to call a post-install script that removes the splash screen instruction from the default boot line generated by GRUB2.

to implement this, put the following lines at the end your preseed file. (or, create a preseed file with these lines, if you're not using preseeding with your Ubuntu install):


# this is just a post-install script.
#
# update Grub to get rid of that splash screen that borks the
# video on netboot installs of 11.04 and later
d-i preseed/late_command string \
cd /target; \
wget http://bigtruck.minazo.net/unbork_splash.sh; \
chmod +x ./unbork_splash.sh; \
chroot ./ ./unbork_splash.sh; \
rm -f ./unbork_splash.sh

this pulls a script down that fixes the GRUB issue, executes it in a chroot of the new install, and then deletes the script.

for the sake of openness, here's the script it pulls:


#!/bin/bash
# by rogueclown, 2011
# WTFPL (Do What The Fuck You Want To Public License)
cd /etc/default
sed "s/quiet splash/quiet/g" grub > grub.new
mv grub grub.orig
mv grub.new grub
update-grub
exit 0

voila: the box reboots, and you've got video.

why a server, much less a Linux server needs a splash screen, i'll never know. i love Ubuntu Server, but i'm quite angry that such a useless feature as a splash screen causes such an annoying problem as borking the virtual terminal on which it tries to display.

story tags 

linux, code, bash

Denemo: it gets better.

Submitted by rogueclown on Tue, 01/18/2011 - 09:12

Denemo is a lot better than i remember it.

i sing in choir. since i'm a terrible pianist, i cannot really sit in front of a piano and play my line of a song easily. this isn't a big problem for some of the music we sing, either because there's an easily accessible rehearsal track, or because we rehearse as a group frequently enough that i pick it up at practice. however, if it's difficult but not particularly well known, i'm in a position to have to make my own rehearsal track.

Denemo is score editing software for Linux...basically, a front end for Lilypond, a GNU music score engraver. it's useful for writing down compositions, but also invaluable if you need to learn a vocal line. it is supposed to allow you to type in a line with associated directions, and then play it back. you can follow along with the score; it plays what you've typed in accurately, unlike my inept piano fingers.

i remember using it about two years ago to make some rehearsal scores, but it was a clunky mess. the keyboard shortcuts weren't particularly intuitive, the menus were a mess, and i had a terrible time getting any of the graphical windows or mouse shortcuts to work. it was an unpleasant experience...i slogged through because i needed to have something reliable from which to rehearse some solos i was trying out for, but i cursed that program left and right. it was so bad that i went back to taking pieces to the rehearsal pianos at the library and blundering through them there. that's BAD.

tonight, i finally revisited it. i needed something in order to make some rehearsal materials for pieces i'm singing this season, and there was no way i was ever going to be able to stumble through playing all my parts. i wanted to give it one more try, since it had been so long. i was excited to see that it worked significantly better than before. the default keyboard shortcuts were easier to type: numbers for notes, and alt-numbers for the corresponding rests. the menus and mouse shortcuts actually work...i'm not tearing my hair out anymore about how to enter a time signature, key change, a fermata, a repeat sign, or anything else! and, if i want to make keyboard shortcuts that make sense to me for any or all of the edits i commonly make to a score, i can.

it isn't perfect. it took me several tries to get triplets to work correctly; this annoyed me greatly, as there were two pieces i was entering in which my line had a ton of triplets. furthermore, even though counting up from 0 instead of from 1 is correct (and the geekier way to do it), it's annoying to have the keyboard shortcut for a whole note (0) on the right side of my keyboard, and then start at 1, 2, 3 for half note, eighth note, sixteenth note, etc. however, i think that can be rectified by changing my keyboard shortcuts around, something i may do if i end up using this program with some frequency.

finally, i'm even more excited because once i did the work of typing in my line from each of my scores, it was so easy to turn each rehearsal score into an mp3 that i can toss on my iPod and listen to when i'm running around town. i just saved the Denemo file as a MIDI file (from right inside Denemo). since i had timidity (a MIDI player, which will also play MIDI files as .wav files) and LAME (an .mp3 encoder) installed on my machine, i just ran the following two commands on the MIDI file:

$ timidity -Ow file.mid -o file.wav
$ lame file.wav
and, there it was. an .mp3 of a piano playing my line in the song, far better than i would ever be able to play it.

story tags 

music, linux
Subscribe to RSS - linux