Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Saturday, March 3, 2012

Rapsberry PI


I have been watching the project for several months and I am quite happy that it finally launched.
The good thing about it is that it offers 90% of the BeagleBoard's (xM) features at roughly 30% of the price. This makes the Berry the new Arduino platform for me.

Sunday, May 9, 2010

Going headless again

After the launch of Ubuntu 10.04 I decided that I have to upgrade to this LTS.
On laptop it was easy but on my server I had a problem. No keyboard and no screen were attached to it - so again I had to do a headless install.
Last time I made a hack with a USB stick but it was quite ugly.
Now I decided to do something cleaner.
The outcome was simple I modified the file isolinux/isolinux.cfg to accommodate aserial console. My file looks like:

serial 0 115200
console 0
prompt 1
timeout 30
default install
label install
menu label ^Install Ubuntu Server
kernel /install/vmlinuz
append console=ttyS0,115200n8 file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz quiet --
label minimal
menu label Install ^Minimal Server
kernel /install/vmlinuz
append console=ttyS0,115200n8 file=/cdrom/preseed/ubuntu-server-minimal.seed initrd=/install/initrd.gz quiet --
label minimalvm
menu label Install Minimal ^VM
kernel /install/vmlinuz
append console=ttyS0,115200n8 file=/cdrom/preseed/ubuntu-server-minimalvm.seed initrd=/install/initrd.gz quiet --
label rescue
menu label ^Rescue a broken system
kernel /install/vmlinuz

With this modification in place I have rewrtten the CD and everything worked as a charm.

Friday, April 30, 2010

64bits upgrade

I have just discovered to my surprise that my home machine is 64 bits capable.
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Celeron(R) CPU 2.66GHz
stepping : 9
cpu MHz : 2660.159
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc up pebs bts pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr lahf_lm
bogomips : 5320.31
clflush size : 64

So the logical step would be to upgrade to a 64bits OS. 10.04 or OpenSolaris?

Wednesday, March 31, 2010

En atendant Ubuntu

There is aboutone month to Lucid Lynx.
In the meanwhile it seems that the video configuration on my laptop is totally chaotic at bot time. The native resolution of the screen is 1280x800 but often (about 30% of the cases) at reboot the resolution is set to 1024x768 and that looks horrible on my screen.
I have tried to understand the behavior but I hadn't been able to.
So I decided to make a hack to fix the resolution to 1280x800.
1. I have run the command Xorg -configure and I got a file named xorg.conf.new that I moved in /etc/X11 under the name xorg.conf
2. I have launched the xvidtune command during a session that booted right and I have displayed the current settings by pressing "Show" button. The current settings were displayed on the terminal from that I've launched xvidtune.
3. I have edited the file /etc/X11/xorg.conf and I have added the following section at the end
Section "Modes"
Identifier "Custom"
ModeLine "1280x800" 71.00 1280 1328 1360 1440 800 803 809 823 -hsync -vsync
EndSection
4. I have edited the section "Monitor" to look like:
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
UseModes "Custom"
EndSection

5. Saved the file and restarted

Now on any reboot I get the default 1280x800 resolution.
Still I am not quite happy with the remaining question of why the resolution is not set correctly at boot time. I'll have to investigate it on my own.

Saturday, October 31, 2009

Upgrade 9.04 to 9.10 headlessly

I did those steps from SSH (although not recommended).

1. apt-get update -> all repos updated
2. apt-get dist-upgrade -> somehow not necessary
3. do-dist-upgrade - the magic begins here
Respond to the questions according to the customizations you've done on your system.
In my case I've chosen to keep my locally installed versions.
At the end DO NOT REBOOT the system (do not answer Y at the final question).
4. Edit the /boot/grub/menu.lst and check if the serial console lines are still present. If not add them by hand before the beginning of "AUTOMAGIC KERNEL" section.
5. Now it would be safe to reboot... Good luck.

If you want to upgrade to grub2 (as I did) do the following:
1. apt-get install grub2
2. Edit the /etc/defaults/grub to something as:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="3"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=serial

GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,38400n8"
GRUB_SERIAL_COMMAND="serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1"
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"

The bolded lines are my modifications for the file.

3. Run /usr/sbin/update-grub as advised.

Monday, July 20, 2009

Headlessly install Ubuntu 9.04 on a headless server



This information is quite old and I have found another method, more reliable, since I have first published this.
For details please see this post: http://dvoina.blogspot.com/2010/05/going-headless-again.html
I will post also the remaster script I've done for the CD.



Basically it is not a server. It is a 2nd hand Dell GX520 on that I've put an 1 TB drive and 1 GB of RAM. I needed a machine on that I can test drive SAP/Netweaver.
I have no monitor home (although I have a spare keyboard) so when I got to install something on the machine I realised that it won't work.
I solved this issue with this trick:

1. I have installed Ubuntu Server 9.04 on my laptop using a 4 GB slash USB stick as target drive.
2. I have modified the GRUB bootloader on the stick to offer a serial console during the boot:
serial --unit=0 --speed=38400 --word=8 --parity=no --stop=1   
terminal --timeout=10 serial console
defopts=console=tty0 console=ttyS0,38400n8


3. I have created the file /etc/event.d/tty0 with the following content:
start on runlevel 1
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

stop on runlevel 0
stop on runlevel 6

respawn
exec /sbin/agetty ttyS0 38400 vt100


4. I have rebooted the server from the stick. The serial was connected via a null modem cable and a PL2303 serial2usb adapter to my laptop.
5. After boot I have created the same partition scheme as on stick to the main drive. I've put labels on the created partitions in order to mount the easily and to have a human readable fstab
6. I have transferred all the files from the partitions of the stick to hard drive
7. I have modified the /etc/fstab in order to reflect the changes
8. I have modified again the file /boot/grub/menu.lst to take into account the new disk.
9. As root I have ran the command grub-install /dev/sda in order to update the MBR and make the drive really bootable.
10. Reboot from the first hard drive.
11. It seems taht the trick worked. Hourray!

I have used some information from http://www.howtoforge.com/setting_up_a_serial_console. You can get more info there.