硬盘安装Ubuntu10.04 Server+Window Maker

==环境介绍==本次安装过程并不顺利,可以参见后面的红色内容。

Fedora14下安装Ubuntu,代替Fedora。默认SSH已经开启。这其实只是众多方式中的一种。

==准备安装==

通过SSH Secure Shell上传

-rw-r--r--.1 root root 700413952  5?24 2010ubuntu-10.04-server-i386.iso

-rw-r--r--.1 root root   6628717  8?31 2010 initrd.gz

-rw-r--r--.1 root root  11375212  8?31 2010 boot.img.gz

-rw-r--r--.1 root root   4029792  8?31 2010 vmlinuz

==修改GRUB ==

/boot/grub/文件夹下看到menu.lst文件其实只是一个链接文件,链接到当前目录下的grub.conf文件.所以我们要修改的就是grub.conf文件了.

lrwxrwxrwx.1 root root     11  3? 5 08:59 menu.lst -> ./grub.conf

 # vi grub.conf

title Install Ubuntu For zheng

root (hd0,1)

kernel /vmlinuz boot=casper iso-scan/filename=/ubuntu-10.04-server-i386.iso ro quiet splash

initrd /initrd.gz

【==开始定制安装==】

安装轻量桌面WindowMaker

shiyan56@shiyan56:~$ sudo apt-get install wmaker
[sudo] password for shiyan56:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  fontconfig-config libfontconfig1 libgif4 libjpeg62 libtiff4 libwraster3
  libxft2 libxinerama1 libxpm4 libxrender1 ttf-dejavu-core
Suggested packages:
  wmaker-data menu asclock gkrellm
The following NEW packages will be installed:
  fontconfig-config libfontconfig1 libgif4 libjpeg62 libtiff4 libwraster3
  libxft2 libxinerama1 libxpm4 libxrender1 ttf-dejavu-core wmaker
0 upgraded, 12 newly installed, 0 to remove and 84 not upgraded.
Need to get 4,542kB of archives.
After this operation, 13.5MB of additional disk space will be used.
Do you want to continue [Y/n]? y

我兴奋的马上运行startx命令,可是系统却返回信息告诉我startx当前还没有安装,可以通过命令sudo apt-get install xinit来安装它,于是我又开始了下面的安装。

shiyan56@shiyan56:~$ sudo apt-get install xinit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  intel-gpu-tools libfontenc1 libgl1-mesa-dri libice6 libpciaccess0
  libpixman-1-0 libsm6 libxaw7 libxfixes3 libxfont1 libxi6 libxkbfile1 libxmu6
  libxt6 libxv1 libxvmc1 x11-common x11-xkb-utils xfonts-base xfonts-encodings
  xfonts-utils xserver-common xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-vmmouse
  xserver-xorg-input-wacom xserver-xorg-video-all xserver-xorg-video-apm
  xserver-xorg-video-ark xserver-xorg-video-ati xserver-xorg-video-chips
  xserver-xorg-video-cirrus xserver-xorg-video-fbdev xserver-xorg-video-geode
  xserver-xorg-video-i128 xserver-xorg-video-i740 xserver-xorg-video-intel
  xserver-xorg-video-mach64 xserver-xorg-video-mga xserver-xorg-video-neomagic
  xserver-xorg-video-nouveau xserver-xorg-video-nv
  xserver-xorg-video-openchrome xserver-xorg-video-r128
  xserver-xorg-video-radeon xserver-xorg-video-rendition xserver-xorg-video-s3
  xserver-xorg-video-s3virge xserver-xorg-video-savage
  xserver-xorg-video-siliconmotion xserver-xorg-video-sis
  xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident
  xserver-xorg-video-tseng xserver-xorg-video-v4l xserver-xorg-video-vesa
  xserver-xorg-video-vmware xserver-xorg-video-voodoo
Suggested packages:
  libglide3 xfs xserver xfonts-100dpi xfonts-75dpi xfonts-scalable
  gpointing-device-settings touchfreeze xinput firmware-linux
Recommended packages:
  xserver-xorg-video-cyrix xserver-xorg-video-nsc
The following NEW packages will be installed:
  intel-gpu-tools libfontenc1 libgl1-mesa-dri libice6 libpciaccess0
  libpixman-1-0 libsm6 libxaw7 libxfixes3 libxfont1 libxi6 libxkbfile1 libxmu6
  libxt6 libxv1 libxvmc1 x11-common x11-xkb-utils xfonts-base xfonts-encodings
  xfonts-utils xinit xserver-common xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-vmmouse
  xserver-xorg-input-wacom xserver-xorg-video-all xserver-xorg-video-apm
  xserver-xorg-video-ark xserver-xorg-video-ati xserver-xorg-video-chips
  xserver-xorg-video-cirrus xserver-xorg-video-fbdev xserver-xorg-video-geode
  xserver-xorg-video-i128 xserver-xorg-video-i740 xserver-xorg-video-intel
  xserver-xorg-video-mach64 xserver-xorg-video-mga xserver-xorg-video-neomagic
  xserver-xorg-video-nouveau xserver-xorg-video-nv
  xserver-xorg-video-openchrome xserver-xorg-video-r128
  xserver-xorg-video-radeon xserver-xorg-video-rendition xserver-xorg-video-s3
  xserver-xorg-video-s3virge xserver-xorg-video-savage
  xserver-xorg-video-siliconmotion xserver-xorg-video-sis
  xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident
  xserver-xorg-video-tseng xserver-xorg-video-v4l xserver-xorg-video-vesa
  xserver-xorg-video-vmware xserver-xorg-video-voodoo
0 upgraded, 64 newly installed, 0 to remove and 84 not upgraded.
Need to get 18.1MB of archives.
After this operation, 67.8MB of additional disk space will be used.
Do you want to continue [Y/n]? y

以上只是初步安装完成windowmaker,还有很多的软件没有安装。这里再安装几个轻量级软件。【当然汉化也没有做哦,只是想着让它以后完美显示中文,当然需要时间】

$ sudo apt-get install  xterm

安装了xterm就可以放心的输入很多的命令来激活GUI工具了。

$ sudo apt-getinstall wmclock wmmount wmmon wmakerconf pcmanfm

通过上面刚刚安装的xterm来输入下面安装的程序名称可以有意想不到的收获。

其中:

wmclock 一个图形化时钟

wmmon   可以监视系统的运行时间和内存、CPU、网络的状态

wmakerconf 可以方便的配置windowmaker的图形显示方式,相当于XP下的控制面板

pcmanfm 一个很轻量的文件浏览器

【==曲径通幽==】

刚刚安装完系统后,在Grub界面出现了乱码现象。且进入系统后,分辨率相当低,网卡没有驱起来!随安装系统不胜数,但此种情况还是头一次碰到!

于是又重新启动系统盯住屏幕看,终于看到内个单词,说什么有文件找不到,仔细分析,呀哈内核没有加载上!怎么可能!接着在出错的系统中进入/boot/目录看到如下所示内容:

shiyan56@shiyan56:~$ ls /boot/
abi-2.6.32-21-generic                initrd-plymouth.img
config-2.6.32-21-generic            memtest86+.bin
config-2.6.35.6-45.fc14.i686     System.map-2.6.32-21-generic
efi                                                  System.map-2.6.35.6-45.fc14.i686
grub                                               vmcoreinfo-2.6.32-21-generic
initramfs-2.6.35.6-45.fc14.i686.img            vmlinuz-2.6.32-21-generic
initrd.img-2.6.32-21-generic       vmlinuz-2.6.35.6-45.fc14.i686

原来fc14的内核不知道什么时候跑了过来!!回想了一下,应该是在安装Grub的时候不小心选错了yes或者no,唉谁让咱E文不好呢!接下来的事情应该就是修改grub的配置文件来让系统找到正确的内核。

/boot/grub/目录查看Grub的配置文件grub.cfg注意在目录下还同时存在一个名为grub.conf的文件,也是在Ubuntu中的新grub中从来都没有过的。看来真的是在安装的时候Ubuntu检测到旧新的系统中也有grub存在为了防止将其引导删除,所以询问安装者是否保留原有的grub配置,所以在grub.cfg文件中就有了引导f14内核的情况,当然如果f14系统保留的话这个引导是没有错的,可是我的Ubuntu在安装后是硬盘上仅存的一个系统了,这样当然就找不到f14的踪影了。再加之种种的巧合让grub的配置文件又莫名的找到拷贝过来的f14内核文件,然后通过f14内核引导ubuntu错误也随之而来了。为了说清楚问题所以写了这么多的文字。

下面让我们打开grub.cfg来看看吧。我们看到了set default="0"这一行,只需将0更改为2就可以了,具体的真的不想再说了。更改后系统启动成功!希望你不会走我的老路!


 

#

# DO NOT EDIT THIS FILE

#

# It is automatically generated by /usr/sbin/grub-mkconfig using templates

# from /etc/grub.d and settings from /etc/default/grub

#

 

### BEGIN /etc/grub.d/00_header ###

if [ -s $prefix/grubenv ]; then

  load_env

fi

set default="0"

if [ ${prev_saved_entry} ]; then

  set saved_entry=${prev_saved_entry}

  save_env saved_entry

  set prev_saved_entry=

  save_env prev_saved_entry

  set boot_once=true

fi

 

function savedefault {

  if [ -z ${boot_once} ]; then

     saved_entry=${chosen}


    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2

set root='(hd0,1)'
search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
set locale_dir=($root)/boot/grub/locale
set lang=C.UTF-8
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35.6-45.fc14.i686' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod ext2
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
        linux   /boot/vmlinuz-2.6.35.6-45.fc14.i686 root=/dev/sda1 ro   quiet splash
}
menuentry 'Ubuntu, with Linux 2.6.35.6-45.fc14.i686 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod ext2
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
        echo    'Loading Linux 2.6.35.6-45.fc14.i686 ...'
        linux   /boot/vmlinuz-2.6.35.6-45.fc14.i686 root=/dev/sda1 ro single
        echo    'Loading initial ramdisk ...'
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod ext2
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
        linux   /boot/vmlinuz-2.6.32-21-generic root=UUID=98f68109-cc7a-475e-80e4-744c8e88633d ro   quiet splash
        initrd  /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod ext2
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
        echo    'Loading Linux 2.6.32-21-generic ...'
        linux   /boot/vmlinuz-2.6.32-21-generic root=UUID=98f68109-cc7a-475e-80e4-744c8e88633d ro single
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
        insmod ext2
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
        linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod ext2
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 98f68109-cc7a-475e-80e4-744c8e88633d
        linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

"/boot/grub/grub.cfg" [readonly] 135 lines, 4148 characters

==挂载分区==

如果想着让系统在启动时自动挂载相应的分区,只需修改/etc/fstab文件就可以了。

fstab文件原来的内容:

# /etc/fstab: static file system information.

#

# Use 'blkid -o value -s UUID' to print the universally unique identifier

# for a device; this may be used with UUID= as a more robust way to name

# devices that works even if disks are added and removed. See fstab(5).

#

# <file system> <mount point>    <type>  <options>       <dump>  <pass>

proc            /proc           proc    nodev,noexec,nosuid 0       0

# / was on /dev/sda1 during installation

UUID=98f68109-cc7a-475e-80e4-744c8e88633d /               ext3    errors=remount-ro 0       1

# /home was on /dev/sda5 during installation

UUID=63295fe8-4cbd-4b8f-a95e-d48804fc488f /home            ext3    defaults        0       2

# /var was on /dev/sda6 during installation

UUID=7aced6c7-b1c3-4e2d-a191-5580a2d2b819 /var            ext3    defaults        0       2

# /var was on /dev/sda6 during installation

UUID=7aced6c7-b1c3-4e2d-a191-5580a2d2b819 /var            ext3    defaults        0       2

在最后一行添加:/dev/sda2       /home/vmos      ext3   defaults        iocharset=utf8

$ sudovi /etc/fstab

/dev/sda2      /home/vmos      ext3    defaults        iocharset=utf8

重启系统后,可以看到如下结果:

$ df-h

Filesystem           Size  Used Avail Use% Mounted on

/dev/sda1             9.2G  740M  8.0G  9% /

/dev/sda5             7.7G  146M  7.2G  2% /home

/dev/sda2             212G  2.4G  199G  2% /home/vmos

/dev/sda6             972M  171M  752M 19% /var

本文出自 “天匆云汇” 博客,转载请与作者联系!

你可能感兴趣的:(职场,ubuntu,硬盘安装,休闲,WindowMaker)