[SOLVED] [12.04] [GRUB] System nie startuje z HDD

Tutaj można zadać pytanie, jeśli Linuksa widzi się pierwszy raz w życiu ;)
szczyglis
Piegowaty Guziec
Piegowaty Guziec
Posty: 5
Rejestracja: 05 wrz 2012, 21:48
Płeć: Mężczyzna
Wersja Ubuntu: 12.04
Środowisko graficzne: Unity
Architektura: x86

[SOLVED] [12.04] [GRUB] System nie startuje z HDD

Post autor: szczyglis »

Witam, mam dosyć dziwny problem, z którym nie jestem sobie w stanie poradzić.
Nie mam już pomysłów, więc chciałbym zapytać na forum, być może ktoś będzie mi w stanie pomóc.

Na początek konfiguracja:
Komp: Laptop Dell Inspiron 1720, HDD WD Caviar 250GB SATA (sda), pendrive Kingston 8GB (sdb) /dlaczego podaję akurat te dane, o tym za chwilę/.
Wersja Ubuntu: 12.04 LTS, kernel: 3.2.0-38-generic-pae, zainstalowany na 1 partycji na HDD (sda), system plików: ext4.

W czym tkwi mój problem? Otóż z racji awarii poprzedniego dysku przez 2 miesiące używałem Ubuntu 12.04 w wersji liveUSB, uruchamianej z pendrive'a. Ostatnio kupiłem jednak nowy dysk i postanowiłem zainstalować na nim Pingwina. Z racji, że trochę czas mnie gonił, nie podzieliłem na partycje, ale to akurat obecnie nie problem. System instalowałem z uruchomionego wcześniej pendrive'a (z LiveUSB), poprzez standardowy ubuntowski instalator. I tutaj zaczęły się cuda. System śmiga na nowym HDD już od 2 tygodni, wszystko działa idealnie, poza jedną dziwną rzeczą: do zabootowania potrzebuje pendrive'a, z którego był instalowany i nie wiem dlaczego.

Postaram się to opisać najdokładniej jak potrafię:

Gdy pendrive nie jest włożony do USB, system z dysku nie odpala, pojawia się jedynie migający "podkreślnik" i nie bootuje dalej. Gdy jednak podczas startu BIOSu włożony jest wspomniany pendrive, system odpala z dysku normalnie. Co ciekawe, probowałem różne kombinacje z ustawieniem boot'a w BIOSie:

#Boot sequence 1:
1) USB
2) HDD
Wynik: system odpala z HDD.


#Boot sequence 2:
1) HDD
2) USB
Wynik: system nie odpala (co ciekawe, nie odpala nawet "live" z USB, mimo iż przed instalacją na HDD, działał).


#Boot sequence 3:
1) HDD (z wyjętym USB)
Wynik: system nie odpala.


#Boot sequence 4:
1) USB (bez HDD)
Wynik: system w wersji "live" nie odpala z pendrive'a, mimo iż wcześniej działało. BIOS: No bootable device.

Wynika więc z tego to, że aby odpalić (zabootować) z HDD, w USB musi być włożony pendrive, z którego instalowałem. To bardzo dziwne, gdyż GRUB znajduje się na HDD, poniżej zawartość pliku "/boot/grub/grub.cfg":

Kod: Zaznacz cały

#
# 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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos1)'
  search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
  set locale_dir=($root)/boot/grub/locale
  set lang=pl_PL
  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 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
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, with Linux 3.2.0-38-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	linux	/boot/vmlinuz-3.2.0-38-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.2.0-38-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-38-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	echo	'Loading Linux 3.2.0-38-generic-pae ...'
	linux	/boot/vmlinuz-3.2.0-38-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-38-generic-pae
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	linux	/boot/vmlinuz-3.2.0-23-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.2.0-23-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	echo	'Loading Linux 3.2.0-23-generic-pae ...'
	linux	/boot/vmlinuz-3.2.0-23-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-23-generic-pae
}
}
### 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='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	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/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###
UUID się zgadza, taki identyfikator ma właśnie mój HDD. Dziwi mnie tylko dlaczego w pliku partycja ext4 jest oznaczona jako [hd0,msdos1].

W folderze z grubem na pendrivie jest jedynie plik loopback.cfg:

Kod: Zaznacz cały

menuentry "Try Ubuntu without installing" {
	linux	/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=${iso_path} quiet splash --
	initrd	/casper/initrd.lz
}
menuentry "Install Ubuntu" {
	linux	/casper/vmlinuz  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity iso-scan/filename=${iso_path} quiet splash --
	initrd	/casper/initrd.lz
}
menuentry "Check disc for defects" {
	linux	/casper/vmlinuz  boot=casper integrity-check iso-scan/filename=${iso_path} quiet splash --
	initrd	/casper/initrd.lz
}
menuentry "Test memory" {
	linux16	/install/mt86plus
}
Macie jakieś pomysły dlaczego tak się dzieje?
Przecież na logikę GRUB startuje z HDD, więc do czego potrzebny jest mu pendrive i dlaczego pendrive już nie bootuje tak jak wcześniej (jako "liveUSB")?

Coś w MBR się źle poinstalowało?
Przy instalacji dałem przecież boot na partycję na HDD.
Nie mam już pomysłów.

Aha, w terminalu, po wpisaniu "fdisk -l", zarówno HDD, jak i pendrive mają flagę "rozruchową":

Kod: Zaznacz cały

Disk /dev/sda: 250.1 GB, 250059350016 bytes
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 30401, w sumie sektorów: 488397168
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0x000cb273

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sda1   *        2048   482110649   241054301   83  Linux
/dev/sda2       482111486   488396799     3142657    5  Rozszerzona
/dev/sda5       482111488   488396799     3142656   82  Linux swap / Solaris

Dysk /dev/sdb: 8019 MB, bajtów: 8019509248
głowic: 102, sektorów/ścieżkę: 38, cylindrów: 4041, w sumie sektorów: 15663104
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
Identyfikator dysku: 0x04030201

Urządzenie Rozruch   Początek      Koniec   Bloków   ID  System
/dev/sdb1   *        4408    15663103     7829348    c  W95 FAT32 (LBA)

Nie chcę w tym momencie instalować systemu na nowo, gdyż mam tutaj sporo pracy i trochę by mi to popsuło kilka rzeczy (backup w tej chwili odpada). Boję się bawić grubem, gdyż obawiam się, że mógłbym coś zamieszać i w ogóle nie zabootuje, bo nie mam z tym doświadczenia. Znam się na linuxie, od dawna na nim pracuję, ale grubem nigdy tak na poważnie się jeszcze nie zabawiałem, więc wolałbym póki co nie majstrować.

Ma ktoś jakieś pomysły, dlaczego tak jest i jak to naprawić?
Byłbym bardzo wdzięczny za pomoc.
Ostatnio zmieniony 25 mar 2013, 19:46 przez szczyglis, łącznie zmieniany 2 razy.
Awatar użytkownika
linuxozaurus
Gibki Gibbon
Gibki Gibbon
Posty: 2154
Rejestracja: 02 lis 2010, 22:45
Płeć: Kobieta
Wersja Ubuntu: 20.04
Środowisko graficzne: GNOME
Architektura: x86_64

Re: [12.04] [GRUB] System nie startuje z HDD

Post autor: linuxozaurus »

System śmiga na nowym HDD już od 2 tygodni, wszystko działa idealnie, poza jedną dziwną rzeczą: do zabootowania potrzebuje pendrive'a, z którego był instalowany i nie wiem dlaczego.
Prawdopodobnie problem z boot loaderem (GRUB2)

Po proszę o wynik Boot Info Script.
witam
Linuxozaurus
Santo Subito Ioannes Paulus II "wolne oprogramowanie dla wolnych ludzi"
Lenowo IdeaPad L340 17API z Windows 11 Windows Dual Boot Linux Mint Cinamon in secure boot end user mode.

🇺🇦Sława Ukrajini!🇺🇦
szczyglis
Piegowaty Guziec
Piegowaty Guziec
Posty: 5
Rejestracja: 05 wrz 2012, 21:48
Płeć: Mężczyzna
Wersja Ubuntu: 12.04
Środowisko graficzne: Unity
Architektura: x86

Re: [12.04] [GRUB] System nie startuje z HDD

Post autor: szczyglis »

linuxozaurus pisze: Po proszę o wynik Boot Info Script.

Kod: Zaznacz cały

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => No boot loader is installed in the MBR of /dev/sda.
 => 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 uses an 
    embedded config file:
    
    ---------------------------------------------------------------------------
    search.fs_uuid 5bbb3f53-0b66-4be0-a662-757e87f23c0e root 
    set prefix=($root)/boot/grub
    ---------------------------------------------------------------------------
    -----.

sda1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 12.04.2 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.06 4.06-pre1
    Boot sector info:  Syslinux looks at sector 60966 of /dev/sdb1 for its 
                       second stage. SYSLINUX is installed in the  directory. 
                       No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /syslinux/syslinux.cfg /ldlinux.sys

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 30401, w sumie sektorów: 488397168
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048   482,110,649   482,108,602  83 Linux
/dev/sda2         482,111,486   488,396,799     6,285,314   5 Extended
/dev/sda5         482,111,488   488,396,799     6,285,312  82 Linux swap / Solaris


Drive: sdb _____________________________________________________________________

Dysk /dev/sdb: 8019 MB, bajtów: 8019509248
głowic: 102, sektorów/ścieżkę: 38, cylindrów: 4041, w sumie sektorów: 15663104
Jednostka = sektorów, czyli 1 * 512 = 512 bajtów
Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1    *          4,408    15,663,103    15,658,696   c W95 FAT32 (LBA)


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        5bbb3f53-0b66-4be0-a662-757e87f23c0e   ext4       
/dev/sda5        30ad7c65-170c-48a7-9260-9caa88c614c7   swap       
/dev/sdb1        1AF6-431E                              vfat       PENDRIVE

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro)
/dev/sdb1        /media/PENDRIVE          vfat       (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)


=========================== sda1/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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos1)'
  search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
  set locale_dir=($root)/boot/grub/locale
  set lang=pl_PL
  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 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
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, with Linux 3.2.0-38-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	linux	/boot/vmlinuz-3.2.0-38-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.2.0-38-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-38-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	echo	'Loading Linux 3.2.0-38-generic-pae ...'
	linux	/boot/vmlinuz-3.2.0-38-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-38-generic-pae
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	linux	/boot/vmlinuz-3.2.0-23-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.2.0-23-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	echo	'Loading Linux 3.2.0-23-generic-pae ...'
	linux	/boot/vmlinuz-3.2.0-23-generic-pae root=UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.2.0-23-generic-pae
}
}
### 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='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root 5bbb3f53-0b66-4be0-a662-757e87f23c0e
	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/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=5bbb3f53-0b66-4be0-a662-757e87f23c0e /               ext4    errors=remount-ro 0       1
UUID=30ad7c65-170c-48a7-9260-9caa88c614c7 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  34.397174835 = 36.933685248   boot/grub/core.img                             1
  36.170906067 = 38.838214656   boot/grub/grub.cfg                             1
   6.881340027 = 7.388782592    boot/initrd.img-3.2.0-23-generic-pae           2
   6.051227570 = 6.497456128    boot/initrd.img-3.2.0-38-generic-pae           2
  36.134029388 = 38.798618624   boot/vmlinuz-3.2.0-23-generic-pae              1
   6.782997131 = 7.283187712    boot/vmlinuz-3.2.0-38-generic-pae              1
   6.051227570 = 6.497456128    initrd.img                                     2
   6.881340027 = 7.388782592    initrd.img.old                                 2
   6.782997131 = 7.283187712    vmlinuz                                        1
  36.134029388 = 38.798618624   vmlinuz.old                                    1

========================= sdb1/syslinux/syslinux.cfg: ==========================

--------------------------------------------------------------------------------
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50

# If you would like to use the new menu and be presented with the option to install or run from USB at startup, remove # from the following line. This line was commented out (by request of many) to allow the old menu to be presented and to enable booting straight into the Live Environment! 
# ui gfxboot bootlogo
--------------------------------------------------------------------------------

================= sdb1: Location of files loaded by Syslinux: ==================

           GiB - GB             File                                 Fragment(s)

            ?? = ??             ldlinux.sys                                    1
            ?? = ??             syslinux/chain.c32                             1
            ?? = ??             syslinux/gfxboot.c32                           1
            ?? = ??             syslinux/syslinux.cfg                          1
            ?? = ??             syslinux/vesamenu.c32                          1

============== sdb1: Version of COM32(R) files used by Syslinux: ===============

 syslinux/chain.c32                 :  COM32R module (v4.xx)
 syslinux/gfxboot.c32               :  COM32R module (v4.xx)
 syslinux/vesamenu.c32              :  COM32R module (v4.xx)

=============================== StdErr Messages: ===============================

xz: (stdin): Dane skompresowane są uszkodzone
Hmm, wychodzi na to, że nie ma zainstalowanego bootmanagera na sda.
Da się to jakoś naprawić z działającego systemu, czy muszę z LiveCD?
mcjg
Sędziwy Jeż
Sędziwy Jeż
Posty: 99
Rejestracja: 05 mar 2009, 23:40
Płeć: Mężczyzna
Wersja Ubuntu: 12.04
Środowisko graficzne: KDE Plasma
Architektura: x86

Re: [12.04] [GRUB] System nie startuje z HDD

Post autor: mcjg »

Kod: Zaznacz cały

man grub-install
I tam jest wszystko pięknie opisane.
Awatar użytkownika
socrates
Wytworny Kaczor
Wytworny Kaczor
Posty: 289
Rejestracja: 15 maja 2011, 01:00
Płeć: Mężczyzna
Wersja Ubuntu: inny OS
Środowisko graficzne: Xfce
Architektura: x86_64

Re: [12.04] [GRUB] System nie startuje z HDD

Post autor: socrates »

Zapewne masz to co mi sie wiele razy przytrafialo.
Grub zainstalowal sie nie na dysku tylko na pendrivie.
Mozna to latwo naprawic O ile pamietam to chyba

Kod: Zaznacz cały

sudo grub-install /dev/sda
Gentoo + XFCE
szczyglis
Piegowaty Guziec
Piegowaty Guziec
Posty: 5
Rejestracja: 05 wrz 2012, 21:48
Płeć: Mężczyzna
Wersja Ubuntu: 12.04
Środowisko graficzne: Unity
Architektura: x86

Re: [12.04] [GRUB] System nie startuje z HDD

Post autor: szczyglis »

socrates pisze:Zapewne masz to co mi sie wiele razy przytrafialo.
Grub zainstalowal sie nie na dysku tylko na pendrivie.
Mozna to latwo naprawic O ile pamietam to chyba

Kod: Zaznacz cały

sudo grub-install /dev/sda

Socratesie, dzięki serdeczne.
Teraz aż się sam w głowę pukam, że to było tak banalne.
Problem rozwiązany, wszystko działa, wiszę Ci duże piwko :)
ODPOWIEDZ

Wróć do „Przedszkole Linuksa”

Kto jest online

Użytkownicy przeglądający to forum: Obecnie na forum nie ma żadnego zarejestrowanego użytkownika i 44 gości