分類彙整: Linux

Ubuntu 解決 /boot 空間不足的問題

要安裝新軟體的時候發現 /boot空間不足
無法更新…..
問題原因就是 每次更新後,沒有把舊的刪除 造成的
以下有兩種解決方是
1. 比較正規的方法 ( 參考 http://www.2eggs.org/archives/476)
在root全限下輸入下列指令
觀看有哪些Linux核心
# dpkg –get-selections | grep linux
知後會出現 許多核心名稱
linux-image–(版本號)……
保留最後一個 其他刪除
刪除指令是
#apt-get remove [名稱]
不過有時候會卡住失敗 就用第二種方法
2.直接進入 /boot 刪除 (參考 http://ju.outofmemory.cn/entry/26160)
#cd /boot
#ls
進入/boot 然後觀看檔案
機本上會有下列五種檔案
abi-3.2.0-XX-generic-pae
config-3.2.0-XX-generic-pae
initrd.img-3.2.0-XX-generic-pae
System.map-3.2.0-XX-generic-pae
vmlinuz-3.2.0-XX-generic-pae
通通使用 rm 的方式 刪除,每一種只保留最版號最大的那一個
之後 值行下列四個指令
#sudo apt-get -f install
#sudo apt-get update
#sudo apt-get upgrade
#sudo apt-get dist-upgrade
在重開機 就完成了

linux partition 大於 2T 硬碟安裝 – parted with gpt

?????linux?? fdisk -l ???????2T???????????parted ????(???GPT??)?
??? S350 Storage Server ??? 1 ? 250GB ? 4 ? 1T ? SATA ??
??? ?? Intel RAID Controller ??? ?? RAID0
– VD0 : Raid0 : 250GB
– VD1 : Raid0 : 4T
??? Debian ? 250 GB SATA ??
:: ?????? – ?? 4T ??????? partition ::
s350-storage:~# fdisk -l
Disk /dev/sda: 248.9 GB, 248999051264 bytes
255 heads, 63 sectors/track, 30272 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 29942 240509083+ 83 Linux
/dev/sda2 29943 30272 2650725 5 Extended
/dev/sda5 29943 30272 2650693+ 82 Linux swap / Solaris
Disk /dev/sdb: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn’t contain a valid partition table
s350-storage:~# apt-get install parted
s350-storage:~# parted /dev/sdb
GNU Parted 1.7.1
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel gpt
(parted) mkpart
Partition name? []? primay
File system type? [ext2]? ext3
Start? 0
End? -1
(parted) print
Disk /dev/sdb: 3996GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 3996GB 3996GB primay
(parted) quit
s350-storage:~# fdisk -l
Disk /dev/sda: 248.9 GB, 248999051264 bytes
255 heads, 63 sectors/track, 30272 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 29942 240509083+ 83 Linux
/dev/sda2 29943 30272 2650725 5 Extended
/dev/sda5 29943 30272 2650693+ 82 Linux swap / Solaris
You must set cylinders.
You can do this from the extra functions menu.
Disk /dev/sdb: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee EFI GPT
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 1) logical=(0, 0, 2)
Partition 1 has different physical/logical endings:
phys=(1023, 254, 63) logical=(267349, 89, 4)
s350-storage:~# mkfs.ext3 /dev/sdb1
s350-storage:~# cd / ; mkdir /pool
s350-storage:/ # mount -t ext3 /dev/sdb1 /pool