歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 升級Fedora 16 與安裝Ubuntu 11.04

升級Fedora 16 與安裝Ubuntu 11.04

日期:2017/3/1 17:23:18   编辑:關於Linux
兩年半前安裝了Fedora11,之後升級到Fedora 12,Fedora 14,期間安裝了大量的軟件,系統越來越慢……固然有我個人懶惰不願優化的原因,系統性能下降也與兩年多來Fedora的復雜程度的增長有關。前天晚上禁不住誘惑升級到了Fedora 16,過程中沒遇到問題,只是升級後發現:(1)Gnome 3的界面進不去,因為筆記本配置太低,沒有獨立顯卡;(2)Classic Gnome with compiz也基本無法使用,盡管我已經裝好了compiz;(3)KDE界面雖然花哨但速度較慢不甚喜歡;(4)無線網卡經常無法工作。

基於以上缺陷,我終於忍無可忍,決定更換系統到Ubuntu或者FreeBSD了。本來我更傾向於FreeBSD的,但是由於下載速度緩慢,不得不暫時放棄。

Ubuntu很快就下完。首先在Fedora下創建啟動U盤,參照 How to create and use Live USB:

Check the size of your USB stick
Many USB sticks indicate the size on the packaging or the outside of the stick.
If you don't know the size of the stick, or want to check it for data, you should be able to auto-mount the USB stick by inserting it into a USB port. You can check the contents and size using the graphical file manager. In Linux, you can also use the command line:
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 143G 14G 122G 10% / /dev/sda1 99M 12M 82M 13% /boot tmpfs 1009M 0 1009M 0% /dev/shm /dev/sdb1 3.9G 4.0K 3.9G 1% /media/usbdisk
USB drives are usually mounted in /media. In this case, the device is /dev/sdb1, has a 3.9GB capacity and is almost empty.
Take note of "/dev/sdb1" or equivalent; you will be specifying the device name if you use the command line method.

How to Partition


CAUTION
This will erase all data on the USB drive! Please read the instructions below carefully.
If the drive has not been partitioned properly (or if you are unsure), use fdisk to repartition it.
It is also possible to do a non-destructive installation of a LiveUSB image, if you have sufficient empty space.ee How to install non-destructively
The fdisk command must be run as root. Include only the drive name in the command, not the partition number. Be sure to select the correct disk, or you may erase important data! Check the output of "df -h" if you are unsure. For example, if your partition will be /dev/sdb1, do:
$ /sbin/fdisk /dev/sdb
If you don't have fdisk installed, run yum install util-linux-ng as root.
The following session output from fdisk shows the responses to give to the prompts. The line starting Last cylinder ... refers to the size of the flash drive, so may be different than in the example.
Command (m for help): d Selected partition 1 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-960, default 1): ↵Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-960, default 960): ↵Using default value 960 Command (m for help): t Selected partition 1 Hex code (type L to list codes): 6 Changed system type of partition 1 to 6 (FAT16) Command (m for help): a Partition number (1-4): 1 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks.
How to Format


CAUTION
This will erase all data on the USB drive! Please read the instructions below carefully.
If your USB media has sufficient free space on a vfat file system already, you do not need to perform this step.
To finish, the partition must be formatted with an actual file system using mkdosfs as the root user. Unmount the device before using mkdosfs. In the below example, /dev/USBPARTITIONNAME might be, for example, /dev/sdb1. Be sure to select the correct partition; formatting destroys all data on it!
$ umount /dev/USBPARTITIONNAME $ /sbin/mkdosfs -F 32 -n usbdisk /dev/USBPARTITIONNAME
If you don't have mkdosfs installed, run "yum install dosfstools" as root.

通過命令
su -c "yum install liveusb-creator"
安裝了Fedora的liveusb-creator,但是發現Fedora的這個程序無法制作Ubuntu的啟動盤。無奈之下,試著把Ubuntu的iso文件復制到U盤裡:
sudo dd if=F12-Live-i686.iso of=/dev/sdX bs=8M
之後重啟電腦,開機之後按c進入grub引導程序。嘗試以往的通過kernel指定vmlinuz時失敗,才發現Grub2中已經沒有了kernel命令,嘗試legacy_kernel和xnu_kernel,結果均遭失敗。於是我嘗試直接指定initrd (hd1,4)/casper/initrd.gz,然後exit,沒成想Ubuntu的安裝界面竟然出現了!
安裝Ubuntu的過程中竟然就已經支持了WIFI,著實令我欣慰,看來Ubuntu這麼多年在用戶友好性上改進不少。
安裝完成後重啟,結果Grub無法正常工作,進入grub rescue模式。用iPad百度之後,發現好文Ubuntu啟動問題以及Grub Rescue修復方法,逐步去試,果然靈驗。轉載該文如下:
Ubuntu啟動問題以及Grub Rescue修復方法
問題:
之前系統是Windows7 64bit(C盤)+ D,E盤(都是NTFS)+ Ubuntu。
今天,在Windows7中刪除了E盤,准備向其中安裝RedHat 6。 重啟Windows7之後發現Ubuntu的grub菜單不能啟動。屏幕顯示Invalid FileSystem。 (如果沒有記錯的話,呵呵)
分析
由於在Windows下面更改了分區狀態,刪掉了Ubuntu之前的一個分區,造成Ubuntu的分區由sda5變為sda4了,這樣找不到grub了,開機顯示
grub rescue>
解決
1. 先使用ls命令,找到Ubuntu的安裝在哪個分區:
grub rescue>ls
會羅列所有的磁盤分區信息,比方說:
(hd0,1),(hd0,5),(hd0,3),(hd0,2)
2. 然後依次調用如下命令:X表示各個分區號碼
grub rescue>ls (hd0,X)/boot/grub
如果都找不到的話,需要查一下是否因為Linux版本差異,造成grub的路徑不對,例如直接ls(hd0,X)/grub等等。
3. 假設找到(hd0,5)時,顯示了文件夾中的文件,則表示Linux安裝在這個分區。
4. 調用如下命令:
grub rescue>set root=(hd0,5)
grub rescue>set prefix=(hd0,5)/boot/grub
grub rescue>insmod /boot/grub/normal.mod
5. 然後調用如下命令,就可以顯示出丟失的grub菜單了。
grub rescue>normal
6. 不過不要高興,如果這時重啟,問題依舊存在,我們需要進入Linux中,對grub進行修復。
進入Linux之後,在命令行執行:
sudo update-grub
sudo grub-install /dev/sda
(sda是你的硬盤號碼,千萬不要指定分區號碼,例如sda1,sda5等都不對)
7. 重啟測試是否已經恢復了grub的啟動菜單? 恭喜你恢復成功!

Grub恢復成功後,開始安裝常用軟件。Ubuntu新的界面不像以前想象中那麼難用,而且他們終於部分放棄了以前屎黃色的界面風格,最難得的是在我那破本本上速度還是很快滴!期待Ubuntu12.04早日發布,到時直接升級之。
Copyright © Linux教程網 All Rights Reserved