What can I find here?

Rants and thoughts about PC's and Operating Systems, much of it drivel, some of it useful.

Gnome, Compiz, Metacity & AWN

Friday, October 15, 2010

I have only recently started using the Gnome desktop and found that I dont' really care for the Gnome panel at all. It's far too much like the Windows taskbar. Instead I prefer Avant Window Navigator which is available in Debian repos. I also prefer Compiz over Metacity for window management. Sure it's easy to install Compiz with apt-get but the documentation I've seen for running Compiz inside of Gnome involves launching compiz like so compiz --replace. Replace..?? Hmm....This means that you're letting Metacity start and then killing it and starting Compiz. Why start Metacity at all? Just to slow down the login? Have a look here:
/usr/share/gdm/autostart/LoginWindow/
That's where metacity is getting started from. Let's halt that and make Compiz start instead.

su
mv /usr/share/gdm/autostart/LoginWindow/metacity.desktop /usr/share/gdm/autostart/LoginWindow/metacity.desktop.orig

Now Metacity is nowhere to be found. Realize that this will affect ALL users!

What about the Gnome panel? Right click on the Gnome panel and select Delete this panel.
What's that you say? The 'Delete this panel' is greyed out!? Fear not, gconf-editor to the rescue:

Menu>System Tools>Configuration Editor (or from CLI gconf-editor)

With gconf-editor browse to:
/desktop/gnome/session/required_components/panel
Change this value from gnome-panel to avant-window-navigator
You won't see any Gnome panels and AWN launches on login.

Now you just need to start compiz.
cd ~/.config/autostart
ln -s /usr/share/applications/compiz.desktop

Changing this value to compiz did not work for some reason:
/desktop/gnome/session/required_components/windowmanager

Boot Linux Mint Debian Edition squashfs from HDD

Sunday, September 26, 2010

This is a simple way to boot the compressed squashfs contained within the LMDE.iso directly from a hard drive.
This equates to the same thing as booting from a DVD just without the DVD.

Why would you want to do this?
Makes for a handy backup.
Nearly an unbreakable OS - you just need GRUB to boot it.
Perhaps you're out of blank media.
It's faster than burning a blank.

First we need to extract some files from the .iso image. Get root

# mkdir loopmount  
# mount -o loop /path/to/linuxmint-debian-201009-gnome-dvd-i386.iso loopmount  
# ls loopmount  
total 5  
dr-xr-xr-x 2 root root 2048 Apr 29 03:32 isolinux  
dr-xr-xr-x 2 root root 2048 Sep 5 10:10 casper  
-r--r--r-- 1 root root 526 Sep 5 10:12 md5sum.txt  

Now that the .iso is loop mounted we can copy files onto the hard drive:

# mkdir /casper
# cp loopmount/casper/* /casper

You can make sure it's all there:

# ls /casper
total 894932
-r--r--r-- 1 root root     30208 Sep 24 09:51 filesystem.manifest-desktop
-r--r--r-- 1 root root     30240 Sep 24 09:51 filesystem.manifest
-r-xr-xr-x 1 root root 906858496 Sep 24 09:52 filesystem.squashfs
-r--r--r-- 1 root root   7190389 Sep 24 09:52 initrd.lz
-r-xr-xr-x 1 root root   2287264 Sep 24 09:52 vmlinuz

Now to make it bootable.

For grub-pc
Create a file something like this:

# cd /etc/grub.d/  
# cat >> 41_LMDE_squash << EOF  
menuentry "Linux Mint Debian squashfs" {  
set root=(hd0,1)  
linux /casper/vmlinuz boot=live live-media-path=/casper quiet splash vga=791  
initrd /casper/initrd.lz  
}  
EOF

# chmod +x 41_LMDE_squash;update-grub2

For grub-legacy
Add an entry to /boot/grub/menu.lst

title  LMDE
root   (hd0,0)
kernel   /casper/vmlinuz boot=live live-media-path=/casper quiet splash vga=791
initrd  /casper/initrd.lz

*Note*
You can still access the partition that the image was booted from mounted @ /live/image
If you intend to use the squashfs as a repair tool you might want a seperate partition for the squashfs itself.
This way you can still chroot into any other partition.

Remastering GRML

Thursday, May 20, 2010

It is recommended that you use grml-live to build your own disc.
I did this in Sid while booted to the grml kernel 2.6.33-grml64

Remastering grml isn't a great idea always.
This solution works if you need:
Live disc with support for YOUR hardware out of the box.
Simple remastering.
debootstrap new installations

I obtained this info here but some info is outdated and simply wrong:
http://wiki.grml.org/doku.php?id=remastering

Loop mount the iso image:
mkdir -p GRML/isomount
cd GRML
# mount -o loop /path/to/grml.iso isomount/


Create a local build directory excluding the original squashfs image - we'll create our own in a moment:
$ mkdir isonew
$ rsync -av --exclude=live/grml64-small.squashfs isomount/ isonew/


Loop mount the squash image itself:
$ mkdir squashmount unsquashed
# mount -o loop -t squashfs isomount/live/grml64-small.squashfs squashmount/
# cp -a squashmount/* unsquashed


Your build environment is complete at this point. Build:

# chroot ~/GRML/unsquashed /usr/bin/zsh
Mount proc and devpts
# mount -t proc none /proc
# mount -t devpts none /dev/pts
# dhclient wlan0
# apt-get update
# apt-get install BLAH BLAH BLAH
# apt-get dist-upgrade
(not recommended <- this will create problems.
# apt-get clean
Locales
# nano /etc/locale.gen (<- optional)
# apt-get install locales localepurge
# localegen
# localepurge

Create a new package list from chroot
# cd
# dpkg -l|grep ii > grml64-small-packages.txt

The new package list lives in unsquashed/root

Important that you umount /proc and /dev/pts prior to leaving chroot
# umount /proc /dev/pts
CTRL+D to leave chroot

mv unsquashed/root/grml64-small-packages.txt isonew/GRML/

Add your custom squashfs image to the build:
# mksquashfs-lzma ./unsquashed new-grml64-small.squashfs
# cp new-grml64-small.squashfs isonew/live/grml64-small.squashfs
# md5sum isonew/live/grml64-small.squashfs
# nano isonew/GRML/md5sums


- Change this line

9af7ef064b4c4a3c447b1ac21f16455d ../live/grml64-small.squashfs

# chmod 644 isonew/GRML/md5sums

Make the new iso image:
# mkisofs -pad -l -r -J -v -V "grml Custom-05.2010" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o grml-05.15.10.iso ./isonew


TIPS:
You can add a grml kernel to your system and boot it. This way you're working with the same kernel as in the remaster. Works on Sid.
deb http://deb.grml.org/ grml-testing main
You may wish to also install zsh on your remastering system to make this easier.

Change wallpaper here:
unsquashed/usr/share/grml/desktop.jpg
Just delete and reset the symlink
OR edit
unsquashed/etc/skel/.xinitrc.d/grml_wallpaper/

For user specific configuration, copy your custom .dotfiles to /etc/skel
 

1

live cd (1) remaster (1)

2

live cd (1) remaster (1)

3

live cd (1) remaster (1)