Tuesday, May 17, 2011

dual-booting debian

here's my story of migrating the existing archlinux 32bit system to dual-boot with debian squeeze 64bit, and using the debian for couple of days.


i wrote the post almost a week ago, but didn't have time to edit and publish it.

intro

i'm fairly experienced linux user, been using it on my desktop since 2003, and tried many linux distros and other unix oses before - slackware, redhat, fedora, gentoo, arch, ubuntu, freebsd, qnx and maybe i forgot some. i also used debian before for a brief period of time, but never installed it myself.

also, i'm a software developer, but i'm not a hardcore system administrator.

installation

1st i decided to download a netinstall iso, and take off a usb stick. my previous distro was Arch, and there the process was super easy -- download usb image, put it on a usb stick using `dd', and reboot.

it's not so easy with cd image that debian provides. so 1st i tried to flash it using unetbootin.

this is not a debian problem, but unetbootin didn't work. official linux binary didn't work because of dynamic libpng dependency (wtf guys? don't you know how to link statically?), so i built from source (wtf again! you need to run ./INSTALL to build. please learn how to use autotools, and how to make build scripts for unix-like oses! or at least write a Makefile).

after i got working unetbootin binary -- it refused to see my usb stick. people suggested to use windows build of unetbootin under wine, so i did that, with the same result. i think it wanted me to make a partition on usb stick, and format it into fat32. maybe this could have worked, but at this point i found an official debian manual about how to put this cd image onto usb stick.

after a bit of trial and error, this worked, and i got into installer.

i selected textmode installer, to avoid all the regular gfx driver problems, associated slowdowns, etc.

some things surprised me, and some disappointed.

good things:
  • disk partitioning tool has allowed me to select my existing partitions, with their current filesystems, and map them to mount points, like /home, /backup, /boot, etc
  • grub2 found my archlinux grub config, and added archlinux menu entries to the boot menu

bad things
  • while disk partitioner allowed me to use my partitions -- it failed later in the process, complaining that they are using unsupported featuers (ext_attr?), and that i need to disable them using tune2fs. i tried that, but since man pages were not included into netinstall image (business-card size one), i couldn't figure out how to fix this problem, so i had to go back, unmap my partitions, and put them into fstab manually after installation.
  • after i got to the "install packages" stage -- it asked me what categories of packages do i want, and the 1st option was "desktop environment". i assumed it was GNOME2, and i was right, but i didn't know that this option will also install Mono (+ several apps written in it), full OpenOffice.org suite, gnash, and all available gfx drivers, including drivers for ancient 90s S3 cards, but not including driver for my gfx card. all this unnecessary clutter took installation time up to 2 hours, and i have pretty fast WAN connection, up to 25 Mbit/s.
after the installation has finished, i rebooted.

1st day of using (setting up)

i booted, and noticed, that debian boot process is much faster than archlinux. not sure who to blame here - but this is good.

i quickly installed irssi, gmrun and few other apps that were missing, and logged into irc to chat with friends (some of them were helping me to solve problems).

of course, i was prepared that gfx driver will be some nv or vesa or nouveau.
i didn't really look what is it. 1st thing that i wanted was to mount my home partition, login, and install a web browser, so that i can find out how to install nvidia driver.

so i did that, and discovered that Chromium version is very much outdated, it oopsed on all opened tabs, and deleted all of my local bookmarks. this was unpleasant.

change of plans -- let's find out how to install latest version of Chromium. 10 minutes later, i added some ubuntu PPA repository to sources.list, installed proper Chromium, and restored my bookmarks from backup. then i noticed, that chromium executable and icon are called chromium-browser in debian, so i had to make symlinks like "/usr/bin/chromium-browser -> /usr/bin/chromium", so my desktop shortcuts keep working.

at this point, i noticed that GNOME2 is also of some older version, and the panel configuration was lost - no clock, no systray, no taskbar, etc. i didn't bother to update GNOME, but simply re-added all panel applets that i need (my needs are very simple, and configuration is fairly easy to rebuild).

now it was the time to install nvidia driver. i googled, and found out how to enable nonfree repositories. then i installed the necessary packages with obscure hard-to-remember names, added driver section to xorg.conf, and rebooted (had to reboot, because PC hanged as soon as i switched to console to load the driver and restart X).
that worked out of 1st attempt, but was still harder than in archlinux, where you just install nvidia package, modprobe nvidia, and restart X.
at this stage, i had almost fully working system, which looked and behaved exactly the same as my archlinux, using the same /home partition. it helped to have all of gtk themes, icons and configs stored in my $HOME folder. i just had to install couple of gtk engines -- and everything started to look as it should.

i even found a tutorial how to recompile cairo package with ubuntu patches to fix crappy font rendering. it was lots of manual work, but it worked, and it's enough for the start.
but i'll have to find out how to do the same to freetype2, libxft and fontconfig.

2nd day of using (installing missing software)

1st i deleted all the gnash/openoffice/mono/etc. i'm sure there are still about 500 packages that i'd want to remove. but that was a start.

now, i wanted to have my vim7.3 (because i really love undofile feature), adobe flashplayer and psi+. it was late night, and i didn't have much time.

1st i tried to google vim7.3 squeeze packages. didn't find any. so i took vim-common, vim-runtime and vim packages from wheezy, and installed them. only to discover they are compiled --without-x. what a shame :(

googled a bit more, tried to find out how to rebuild packages to fit my needs. failed. had to remove the wheezy packages, and install vim using ./configure && make && sudo make install. sad but true.

and to my surprise -- flashplugin was super-easy, it installed with single apt-get command, and worked great.

next, i tried to find psi+ packages. and discovered there were none :(

some people said that the packages are available in testing/unstable repos, but the whole point for me was to have debian stable.

a friend told me how to change debian logo on the gnome start button to normal gnome foot logo, and that worked beautifully.

time ran out at this stage for this day.

overall impressions

  • debian is _much_ harder and slower to install and configure than archlinux. it took me about 8 hours to get there. archlinux does the same in 1.5-2 hours (that is when you do it for the 1st time in your life).
  • some very important for me applications are missing, and the only way to get them is to compile manually, or run windows versions using wine.
  • i still feel uncomfy in many cases, and i didn't feel like that when i shifted from ubuntu to arch.
  • i still have many aspects of the system untested, and i don't know if _everything_ works
... [maybe] to be continued

1 comments:

nordwind said...

то же самое было бы при переезде на любой другой дистр, вылезло бы чего нибудь, так что сравнительно легко отделался. :)