Saturday, March 28, 2009

How a non-root user can use apt-get download-only feature?

Some time all you need is just getting required *.deb files to install some programs, for example, to another system that don't have Internet connection. Of course, under root you can use --download-only parameter as:

# apt-get --download-only install wesnoth

(or on Ubuntu $ sudo apt-get --download-only install wesnoth)

Then copy downloaded files from /var/cache/apt/archives. But even if you don't have root permissions the following pipe gives you desired result:

$ apt-get --yes --print-uris install wesnoth | grep --regex 'tp://.*deb' | cut -d ' ' -f1 | sed "s/^'//g;s/'$//g" | wget -i -

As you can see, wget accept URL from input (stdin) with -i option.

Tuesday, March 10, 2009

Install CentOS 5.2 from network (Internet)

Just some step:
  1. Download netinstall iso from centos.org, for example, CentOS-5.2-i386-netinstall.iso.
  2. Burn it if needed (if you want to install to real machine).
  3. Boot from CD.
  4. When asked type:
Enjoy!

Monday, March 09, 2009

A nice and quiet comprehensive introduction about hard disk

Thanks to the guys from IBM DeveloperWorks, I've found this very useful articles about one of most important PC components - the hard driver.

Sunday, March 01, 2009

Access denied error in flashnul or a try to install other Linux for new-purchased HP 2133

Today I've just purchased a HP 2133 - really nice netbook with VIA C7-M 1.6GHz, 1GB RAM and 120 GB Hard Disk, costs about 350$. Everything is good, except the OS pre-installed is Suse Linux. I'm not from those Ubuntu lovers, who can always take Ubuntu Netbook Remix. I'm looking for something from Fedora or Xandros, but at the moment I have no choice.


So I downloaded UNR img file from their server, followed the instruction - used flashnul to write the image to a USB stick, but got an access denied error message. If you have the same problem, you must indicate the drive name instead of its number, for example:

D:\flashnul\flashnul.exe G: -L D:\unr-1.0.1.img

Now I'm installing UNR from the USB stick...

P.S. you can get UNR and more information from ubuntu wiki.

Update 1: there is something wrong with flashnul and I didn't get a bootable USB device. I used dd command on the pre-installed SuSE Linux and it works fine. But the installation could not be continued because the installer "did not find an installation target device".

I'm going to install Ubuntu 8.10 and then UNR packages...

Update 2: now I have a Ubuntu system installed, of course with difficult in Xorg configuration. You can get more documentation from ubuntu wiki. Here is my xorg.conf, taken from Internet (pay attention on PanelID, because if it's wrong, all windows will be bigger than the screen):

# /etc/X11/xorg.conf for hp Mini-Note 2133 FU339EA ubuntu 8.10
# with ubuntu 8.04 change the PanelID option
# based on the xorg.conf published on http://hp2133.umsw.de/xorg.conf

Section "Device"
Identifier "Device 0"
Driver "via"
VendorName "VIA Technology"
Option "NoDDCValue"
Option "ActiveDevice" "LCD"
# Option "PanelID" "17" # si ubuntu 8.04
Option "PanelID" "9" # si ubuntu 8.10
Option "DisplayHardwareLayout" "LCD" #for chip (CX700, CX800) with LVDS/TMDS support. Not set for(CN896, CN700).
Option "ForceLCD" "TRUE"
Option "Refresh" "60"
EndSection

Section "Monitor"
Identifier "Monitor 0"
DisplaySize 196 116
HorizSync 28-50
VertRefresh 43-60
Option "DPMS"
# mode "1024x600": 49.0 MHz, 37.3 kHz, 60.0 Hz
Modeline "1024x600_60" 48.96 1024 1064 1168 1312 600 601 604 622 -hsync +vsync # http://hp2133.umsw.de/xorg.conf
# mode "800x600": 40.0 MHz, 37.9 kHz, 60.3 Hz
Modeline "800x600_60" 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync
# mode "800x600": 36.0 MHz, 35.2 kHz, 56.2 Hz
Modeline "800x600_56" 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync
# mode "800x480": 40.0 MHz, 37.9 kHz, 60.3 Hz
Modeline "800x480_60" 40.00 800 832 960 1056 480 541 545 628 -hsync +vsync
# mode "720x576": 32.7 MHz, 35.9 kHz, 60.1 Hz
Modeline "720x576_60" 32.70 720 744 816 912 576 577 580 597 -hsync +vsync
EndSection

Section "Screen"
Identifier "Screen 0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x600_60" "800x600_60" "800x600_56" "800x480_60" "720x576_60"
EndSubSection
SubSection "Display"
Depth 32
Modes "1024x600_60" "800x600_60" "800x600_56" "800x480_60" "720x576_60"
EndSubSection
Device "Device 0"
Monitor "Monitor 0"
EndSection

Section "Device"
Identifier "Device 1"
BoardName "Chrome9 HC IGP"
Driver "via"
Option "DeviceSwitchHotkey" # si écran externe
Option "MergedFB" "TRUE"
EndSection

Section "Monitor"
Identifier "External"
Option "DPMS"
EndSection

Section "Screen"
Identifier "Screen 1"
Device "Device 1"
Monitor "External"
Subsection "Display"
Depth 24 # Depth 16 broke
EndSubsection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Screen 0"
Screen "Screen 1"
Option "RandR" "False" # d' après viax.conf via
EndSection

I'm going to install UNR interface...

Update 3: The netbook-launcher has been removed because it's still buggy. For example, there is not Firefox in Internet section. What's a shame! The maximus tool works quiet fine. What about HP 2133 in general? It's perfect: beautiful design, small (of course), fast and compatible with Linux. The only minus is heating because of CPU type - Via C7. But HP 2140 and newer will resolve this problem with Intel Atom.