Eu tenho um sistema Kubuntu 11.10 com um HDD ( sda
) e um SSD ( sdb
). /home
e /var
e swap são partições no HDD e a partição /
é a única no SSD. Todas as partições são ext4 (exceto swap).
Agora eu reduzi um pouco a partição /home
para obter uma partição /tmp
no HDD, para ser gentil com o SSD.
Em seguida, introduzi uma nova linha em /etc/fstab
, onde copiei a linha de /var
e substituí o UUID e o ponto de montagem. Limpei /tmp
e saí do modo drwxrwxrwt
.
proc /proc proc nodev,noexec,nosuid 0 0
UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d / ext4 discard,errors=remount-ro 0 1
UUID=78baabf7-d7a6-420d-a992-d4bebb83e2ed /home ext4 defaults 0 2
UUID=4ebe846f-5fcb-45e8-bad7-2e28d223b183 /var ext4 defaults 0 2
UUID=ce4aaf1a-3841-4bac-8fa3-31bda839a579 /tmp ext4 defaults 0 2
UUID=87439ac8-0044-4a54-8b2d-7cefc644b2a6 none swap sw 0 0
Quando reinicializei, recebi o seguinte erro em uma tela azul sólida:
error: could not read file
Eu tentei reinstalar o GRUB 2, seguindo este wiki alemão . Você pode ver os comandos lá, eu fiz eles para /dev/sdb
.
Como posso consertar meu sistema, sem precisar reinstalar tudo?
Prioridade de inicialização
O SSD é o segundo dispositivo SATA, o HDD é o primeiro:
Masestáselecionadocomoodispositivodeinicializaçãoprincipal:
A saída de blkid
:
# blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="HP-var" UUID="4ebe846f-5fcb-45e8-bad7-2e28d223b183" TYPE="ext4"
/dev/sda2: LABEL="HP-User" UUID="78baabf7-d7a6-420d-a992-d4bebb83e2ed" TYPE="ext4"
/dev/sda3: LABEL="HP-tmp" UUID="ce4aaf1a-3841-4bac-8fa3-31bda839a579" TYPE="ext4"
/dev/sda4: UUID="87439ac8-0044-4a54-8b2d-7cefc644b2a6" TYPE="swap"
/dev/sdb1: LABEL="SSD" UUID="0d6e6bb9-ec95-4563-b74e-323aeb51a63d" TYPE="ext4"
Script de informações de inicialização
Isso é o que o script de informações de inicialização me oferece:
Boot Info Script 0.60 from 17 May 2011
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
in partition 1 for ??.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for ?? on this drive.
sda1: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
sda2: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
sda3: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:
sda4: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sdb1: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 11.10
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 948,477,600 968,944,409 20,466,810 83 Linux
/dev/sda2 63 938,179,934 938,179,872 83 Linux
/dev/sda3 938,179,935 948,477,599 10,297,665 83 Linux
/dev/sda4 968,960,000 976,771,071 7,811,072 82 Linux swap / Solaris
Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders, total 117231408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdb1 2,048 117,229,567 117,227,520 83 Linux
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 4ebe846f-5fcb-45e8-bad7-2e28d223b183 ext4 HP-var
/dev/sda2 78baabf7-d7a6-420d-a992-d4bebb83e2ed ext4 HP-User
/dev/sda3 ce4aaf1a-3841-4bac-8fa3-31bda839a579 ext4 HP-tmp
/dev/sda4 87439ac8-0044-4a54-8b2d-7cefc644b2a6 swap
/dev/sdb1 0d6e6bb9-ec95-4563-b74e-323aeb51a63d ext4 SSD
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sr0 /cdrom iso9660 (ro,noatime)
=========================== sdb1/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
set have_grubenv=true
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
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
set locale_dir=($root)/boot/grub/locale
set lang=de_DE
insmod gettext
fi
terminal_output gfxterm
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
if background_color 0,71,115; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, mit Linux 3.0.0-16-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
linux /boot/vmlinuz-3.0.0-16-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-16-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-16-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
echo 'Linux 3.0.0-16-generic wird geladen …'
linux /boot/vmlinuz-3.0.0-16-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.0.0-16-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, mit Linux 3.0.0-15-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
linux /boot/vmlinuz-3.0.0-15-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-15-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-15-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
echo 'Linux 3.0.0-15-generic wird geladen …'
linux /boot/vmlinuz-3.0.0-15-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.0.0-15-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-14-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
linux /boot/vmlinuz-3.0.0-14-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-14-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-14-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
echo 'Linux 3.0.0-14-generic wird geladen …'
linux /boot/vmlinuz-3.0.0-14-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.0.0-14-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-13-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
linux /boot/vmlinuz-3.0.0-13-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-13-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-13-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
echo 'Linux 3.0.0-13-generic wird geladen …'
linux /boot/vmlinuz-3.0.0-13-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.0.0-13-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro quiet splash vt.handoff=7
initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, mit Linux 3.0.0-12-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
echo 'Linux 3.0.0-12-generic wird geladen …'
linux /boot/vmlinuz-3.0.0-12-generic root=UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-3.0.0-12-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 0d6e6bb9-ec95-4563-b74e-323aeb51a63d
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
=============================== sdb1/etc/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
UUID=0d6e6bb9-ec95-4563-b74e-323aeb51a63d / ext4 discard,errors=remount-ro 0 1
UUID=ce4aaf1a-3841-4bac-8fa3-31bda839a579 /tmp ext4 defaults 0 2
UUID=78baabf7-d7a6-420d-a992-d4bebb83e2ed /home ext4 defaults 0 2
UUID=4ebe846f-5fcb-45e8-bad7-2e28d223b183 /var ext4 defaults 0 2
UUID=87439ac8-0044-4a54-8b2d-7cefc644b2a6 none swap sw 0 0
--------------------------------------------------------------------------------
=================== sdb1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
16.268638611 = 17.468317696 boot/grub/core.img 1
16.268650055 = 17.468329984 boot/grub/grub.cfg 1
1.716423035 = 1.842995200 boot/initrd.img-3.0.0-12-generic 2
2.290039062 = 2.458910720 boot/initrd.img-3.0.0-13-generic 2
2.631473541 = 2.825523200 boot/initrd.img-3.0.0-14-generic 2
29.821289062 = 32.020365312 boot/initrd.img-3.0.0-15-generic 2
21.446289062 = 23.027777536 boot/initrd.img-3.0.0-16-generic 2
14.587322235 = 15.663017984 boot/vmlinuz-3.0.0-12-generic 1
0.161544800 = 0.173457408 boot/vmlinuz-3.0.0-13-generic 1
1.880294800 = 2.018951168 boot/vmlinuz-3.0.0-14-generic 2
3.247486115 = 3.486961664 boot/vmlinuz-3.0.0-15-generic 3
2.349048615 = 2.522271744 boot/vmlinuz-3.0.0-16-generic 1
2.349048615 = 2.522271744 vmlinuz 1
3.247486115 = 3.486961664 vmlinuz.old 3
========= Devices which don't seem to have a corresponding hard drive: =========
sdc sdd sde sdf
=============================== StdErr Messages: ===============================
To be able to see for which directory Grub2 (v1.99) looks for, install "unlzma".
To be able to see for which directory Grub2 (v1.99) looks for, install "unlzma".