Ubuntu14.04 升级 SSD 产生的疑问

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#76

帖子 admin_xyz » 2014-09-13 13:06

Doesn't Need ESP Partition? Why?
Create a mebibyte partition {+1MiB with gdisk) on the disk with no file system and type ef02 (or bios_grub in parted). This partition can be in any position order but has to be on the first 2 TiB of the disk. This partition needs to be created before GRUB installation.
What 's Mean ?

EFI(sda1),/boot(sda2), / (sda3) , /usr (sda4), /var (sda5)

Am i ok ?
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#77

帖子 admin_xyz » 2014-09-13 13:31

代码: 全选

ubuntu@ubuntu:~$ sudo parted /dev/sda print
Model: ATA PLEXTOR PX-128M6 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  525MB   524MB   ext4
 2      525MB   43.5GB  42.9GB  ext4
 3      43.5GB  86.4GB  42.9GB  ext4
 4      86.4GB  97.2GB  10.7GB  ext4
 5      97.2GB  113GB   16.1GB  ext4
 6      113GB   113GB   210MB   fat32              msftdata

ubuntu@ubuntu:~$ 
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu14.04 升级 SSD 产生的疑问

#78

帖子 poloshiao » 2014-09-13 13:36

Doesn't Need ESP Partition? Why?
Create a mebibyte partition {+1MiB with gdisk) on the disk with no file system and type ef02 (or bios_grub in parted). This partition can be in any position order but has to be on the first 2 TiB of the disk. This partition needs to be created before GRUB installation.
跟下面兩個描述是一樣的
viewtopic.php?p=3104597#p3104597
1-1. 如果 開機硬盤 是 GPT 一定要 efi 分区
efi 分区 在硬盘第一个分区 是 比較建議的選擇 不是必須的選擇

1-1-2. 如果是 Legacy Bios 開機
efi 分区 掛載在 (空白 不要填 讓安裝程式自動決定)
分割區型態 bios_grub (稱為 BIOS boot partition)
注意
bios_grub 是 Legacy Bios 開機韌體 下
不是 UEFI 開機韌體 下
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu14.04 升级 SSD 产生的疑问

#79

帖子 poloshiao » 2014-09-13 13:56

EFI(sda1),/boot(sda2), / (sda3) , /usr (sda4), /var (sda5)
1 1049kB 525MB 524MB ext4
2 525MB 43.5GB 42.9GB ext4
3 43.5GB 86.4GB 42.9GB ext4
4 86.4GB 97.2GB 10.7GB ext4
5 97.2GB 113GB 16.1GB ext4
6 113GB 113GB 210MB fat32 msftdata
1. 所以 這次要 全新安裝 ?
2 /dev/sda6 fat32 210MB 你打算作為什麼用途
3. /dev/sda1 請參閱
https://help.ubuntu.com/community/DiskS ... T_disks.29
4.. 你的分割區太大了 一般不需那麼大
參考
https://help.ubuntu.com/community/DiskS ... ex_Schemes
Sizes For Alternative Schemes
4-1. GPT 共可分割出 128 個主分割區 所以多出的空間 以後再分割 不需一次通通分割完畢
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#80

帖子 admin_xyz » 2014-09-13 13:59

代码: 全选

ubuntu@ubuntu:~$ sudo parted /dev/sda print
Model: ATA PLEXTOR PX-128M6 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  538MB   537MB   fat32              msftdata
 2      538MB   1158MB  620MB   ext4
 3      1158MB  44.1GB  42.9GB  ext4
 4      44.1GB  87.1GB  42.9GB  ext4
 5      87.1GB  103GB   16.1GB  ext4
 6      103GB   114GB   10.7GB  ext4



This is new !
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#81

帖子 admin_xyz » 2014-09-13 14:03

1 1049kB 538MB 537MB fat32 msftdata #This EFI Partition


2 538MB 1158MB 620MB ext4 #This is /boot
3 1158MB 44.1GB 42.9GB ext4 # This /
4 44.1GB 87.1GB 42.9GB ext4 #This is /usr
5 87.1GB 103GB 16.1GB ext4 #This is /var
6 103GB 114GB 10.7GB ext4 #This is my other data...
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu14.04 升级 SSD 产生的疑问

#82

帖子 poloshiao » 2014-09-13 14:17

1 1049kB 538MB 537MB fat32 msftdata #This EFI Partition
/dev/sda1
1. 把 fat32 移除 (重新分割但是不要格式化)
2. flag msftdata 改為 bios_grub
3. 安裝時 不要掛載
參閱
http://askubuntu.com/questions/362689/e ... pt-problem
http://askubuntu.com/questions/132843/w ... tall-12-04
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#83

帖子 admin_xyz » 2014-09-13 14:25

ubuntu@ubuntu:~$ sudo parted /dev/sda print
Model: ATA PLEXTOR PX-128M6 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 bios_grub
2 538MB 1158MB 620MB ext4
3 1158MB 44.1GB 42.9GB ext4
4 44.1GB 87.1GB 42.9GB ext4
5 87.1GB 103GB 16.1GB ext4
6 103GB 114GB 10.7GB ext4


That's right ?
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#84

帖子 admin_xyz » 2014-09-13 14:29

What should i do now ...

my idea:
1. sudo fsarchiver -v restfs /dev/sd....
2. https://help.ubuntu.com/community/UEFIB ... FI_systems ==> follow this..
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu14.04 升级 SSD 产生的疑问

#85

帖子 poloshiao » 2014-09-13 17:09

my idea:
1. sudo fsarchiver -v restfs /dev/sd....
2. https://help.ubuntu.com/community/UEFIB ... FI_systems ==> follow this..
1. 你原來 /dev/sdb 安裝 並沒有確定能成功開機
所以
sudo fsarchiver -v savefs /dev/sd....
是否有意義
是需要被檢視的
所以
sudo fsarchiver -v restfs /dev/sd....
是否有意義
是需要被質疑的

2. https://help.ubuntu.com/community/UEFIB ... FI_systems
是在 EFI enabled 的情況 安裝的

3. /dev/sda1 1049kB 538MB 537MB fat32 bios_grub
是在 EFI disabled (Legacy Bios enabled) 情況安裝的

4. 2, 與 3 是不相容的

5. /dev/sda1 1049kB 538MB 537MB fat32 bios_grub
如果是 EFI disabled (Legacy Bios enabled) 情況
使用 gparted 把 /dev/sda1 刪除分割區 再重新分割 /dev/sda1 不必格式化 只要把 flag 設為 bios_grub
意思是 不要 fat32 格式 如果無法寫進 bios_grub flag 請再貼文

6. 安裝方法
https://help.ubuntu.com/community/GraphicalInstall
6-1. 進行到
https://help.ubuntu.com/community/Graph ... ation_type
選擇 最後一項
6-1. /dev/sda1 可以點選 但是不要掛載
6-2. 其它分割區 按照你的計畫掛載
6-3. grub 2 安裝到 /dev/sda 不是分割區

7. 安裝完畢
重新開機
從 /dev/sda 開機
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#86

帖子 admin_xyz » 2014-09-18 15:51

I am sorry... My computer has UEFI mode, I saw wrong...


I want to Install Ubuntu In UEFI mode...(Install to SSD)

but question is

My SSD has GPT ...

a.png
GPT and mount point ...(my question)

Question1: Install ubuntu to where? sda1? sda2?

Question2: How about mount point ? If GPT, I can't set mount point in installer. I want sda2 mount point is /boot , sda3 mount point /
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu14.04 升级 SSD 产生的疑问

#87

帖子 poloshiao » 2014-09-18 16:33

My computer has UEFI mode
I want to Install Ubuntu In UEFI mode...(Install to SSD)
My SSD has GPT ...
1. UEFI enabled 硬盤必須是 GPT

2. 參考
viewtopic.php?p=3104597#p3104597
1-1. 如果 開機硬盤 是 GPT 一定要 efi 分区
efi 分区 在硬盘第一个分区 是 比較建議的選擇 不是必須的選擇
1-1-1. 如果是 uefi enabled 開機
efi 分区 掛載在 /boot/efi
efi 分区 分割區型態 fat32
所以 /dev/sda1 格式化成 fat32 掛載在 /boot/efi
其它跟 Legacy Bios 傳統方法安裝/掛載 沒兩樣

3. 安裝方法
下面方法是在 UEFI enabled 情況安裝
參閱
https://help.ubuntu.com/community/GraphicalInstall
進行到
https://help.ubuntu.com/community/Graph ... ation_type
選擇 最後一項
something else
按你的計畫掛載
/dev/sda1 at32 /boot/efi
/dev/sda2 ext4 /boot
/dev/sda3 ext4 /
/dev/sda4 ext4 /usr
/dev/sda5 ext4 /var
/dev/sda6 ext4 /diskdata # diskdata 可以自己取名
/dev/sdb3 ext4 /home
4. grub 2 安裝到 /dev/sda 不是分割區
5. 安裝完畢 需要使用 efibootmgr 指令 在 UEFI 開機韌體內 建立開機選項 參閱
viewtopic.php?p=3102873#p3102873
需要從 uefi 使用 efibootmgr 建立 Ubuntu 開機選項 指向 /dev/sda1 裡的 ubuntu 開機檔案
6. 然後 重開機
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#88

帖子 admin_xyz » 2014-09-25 17:48

好吧... 重装到ssd继续折腾 !

现在已经把ubuntu14.04安装到了ssd中. 对ssd也做了一些优化. 又产生了一些问题

代码: 全选

xyz@benben:~$ cd /etc/cron.weekly/
xyz@benben:/etc/cron.weekly$ ls
0anacron  apt-xapian-index  fstrim  man-db  update-notifier-common
xyz@benben:/etc/cron.weekly$
问题1.

fstrim 文件是ext4系统为了优化ssd而做的吗?

为什么放在cron.weekly里面呢?

如果错过cron.weekly的执行时间anacrontab是否会自动执行呢?
头像
admin_xyz
帖子: 199
注册时间: 2012-05-26 8:33
系统: Ubuntu 12.04

Re: Ubuntu14.04 升级 SSD 产生的疑问

#89

帖子 admin_xyz » 2014-09-25 17:52

问题2:

代码: 全选

xyz@benben:~$ service --status-all
 [ + ]  acpid
 [ - ]  anacron
 [ - ]  apparmor
 [ ? ]  apport
 [ + ]  avahi-daemon
 [ + ]  bluetooth
 [ - ]  brltty
 [ ? ]  console-setup
 [ + ]  cron
 [ + ]  cups
 [ + ]  cups-browsed
 [ - ]  dbus
 [ ? ]  dns-clean
 [ + ]  friendly-recovery
 [ - ]  grub-common
 [ ? ]  irqbalance
 [ + ]  kerneloops
 [ ? ]  killprocs
 [ ? ]  kmod
 [ ? ]  lightdm
 [ ? ]  mysql
 [ ? ]  networking
 [ ? ]  ondemand
 [ ? ]  pppd-dns
 [ - ]  procps
 [ - ]  pulseaudio
 [ ? ]  rc.local
 [ + ]  resolvconf
 [ - ]  rsync
 [ + ]  rsyslog
 [ + ]  saned
 [ ? ]  sendsigs
 [ ? ]  speech-dispatcher
 [ - ]  sudo
 [ - ]  udev
 [ ? ]  umountfs
 [ ? ]  umountnfs.sh
 [ ? ]  umountroot
 [ - ]  unattended-upgrades
 [ - ]  urandom
 [ + ]  virtualbox
 [ - ]  x11-common
+,-, ? 各代表什么意思呢?



问题3.

sysv-rc-conf 我用这个管理启动的服务...但好像不好使哦...

按 - 是关闭一项服务, 为什么开机还会启动呢?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu14.04 升级 SSD 产生的疑问

#90

帖子 poloshiao » 2014-09-25 19:55

现在已经把ubuntu14.04安装到了ssd中.
恭喜
对ssd也做了一些优化.
能夠描述一下 做了哪些優化 ?
回复