Naprawa/przeniesienie Gruba z USB na dysk (partycje /boot na sda3)

Wyłącznie system! Wątpliwości dotyczące aplikacji proszę umieszczać niżej, w odpowiednich forach.
Ronin12
Piegowaty Guziec
Piegowaty Guziec
Posty: 8
Rejestracja: 20 cze 2013, 11:43

Naprawa/przeniesienie Gruba z USB na dysk (partycje /boot na sda3)

Post autor: Ronin12 »

Moj boot jest na pratycji:
/dev/sdc1 * 63 31262489 15631213+ c W95 FAT32 (LBA)

a ja chcę by był a partycji:
/dev/sda3
jak to zrobić?
(Jest to oddzielnie zrobiona partycja na boot (ext4, pkt montowania /boot) gdyż reszta jest w RAID0)


Widzę różne poradniki "naprawy gruba", ale one zwykle dotyczą zepsutego (przez instalacje Windows)GRUB'a.
U mnie wszystko "działa" z tym, że Ubuntu "odpala się" tylko z Pena, zamiast ruszać z ww. partycji boot (/dev/sda3).
Najprawdopodobniej przy instalacji, po mojej odpowiedzi TAK, na pytanie: ~"czy nadpisac Grub na MBR" instalator wcisnął boota na USB (gdyz wowczas byl to dysk sda).
Nie chcę nic zepsuć dlatego proszę o pomoc.
Nie muszę więc raczej używać LiveCD bo mój Linux włącza się.
Pytanie czy postępowanie zgodnie z poleceniami załatwi sprawę:

Kod: Zaznacz cały

mount /dev/sda3 /mnt
mount /dev/sda3 /mnt/boot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
chroot /mnt
grub-install /dev/sda3
update-grub
reboot
??
namok
Przebojowy Jelonek
Przebojowy Jelonek
Posty: 1703
Rejestracja: 01 mar 2008, 12:21
Płeć: Mężczyzna
Wersja Ubuntu: 16.04
Środowisko graficzne: Unity
Architektura: x86_64
Kontakt:

Re: Naprawa/przeniesienie Gruba z USB na dysk (partycje /boot na sda3)

Post autor: namok »

Podaj wynik bootinfoscript.
Ronin12
Piegowaty Guziec
Piegowaty Guziec
Posty: 8
Rejestracja: 20 cze 2013, 11:43

Re: Naprawa/przeniesienie Gruba z USB na dysk (partycje /boot na sda3)

Post autor: Ronin12 »

Kod: Zaznacz cały

sudo: /home/vic/Downloads/bootinfoscript: command not found
vic@ubuntu:~$ 

marcin1982
Gibki Gibbon
Gibki Gibbon
Posty: 3209
Rejestracja: 30 wrz 2007, 13:49
Płeć: Mężczyzna

Re: Naprawa/przeniesienie Gruba z USB na dysk (partycje /boot na sda3)

Post autor: marcin1982 »

Pobierz to z linku podanego przez kolegę namok. Zapisz na Pulpicie, rozpakuj, przejdź w konsoli do rozpakowanego katalogu i wykonaj polecenie:

Kod: Zaznacz cały

sudo ./bootinfoscript
Ronin12
Piegowaty Guziec
Piegowaty Guziec
Posty: 8
Rejestracja: 20 cze 2013, 11:43

Re: Naprawa/przeniesienie Gruba z USB na dysk (partycje /boot na sda3)

Post autor: Ronin12 »

Kod: Zaznacz cały

                  Boot Info Script 0.61      [1 April 2012]


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

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 
    13368 of the same hard drive for core.img, but core.img can not be found 
    at this location.
 => No boot loader is installed in the MBR of /dev/sdb.
 => Grub2 (v1.99) is installed in the MBR of /dev/sdc and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    in partition 112 for .

sda1: __________________________________________________________________________

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

sda2: __________________________________________________________________________

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

sda3: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        /grub/grub.cfg

sdb1: __________________________________________________________________________

    File system:       linux_raid_member
    Boot sector type:  Unknown
    Boot sector info: 

sdb2: __________________________________________________________________________

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

sdc1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  SYSLINUX 4.07 2013-07-25
    Boot sector info:  Syslinux looks at sector 60998 of /dev/sdc1 for its 
                       second stage. SYSLINUX is installed in the /uui 
                       directory. No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /boot/grub/grub.cfg /efi/BOOT/grubx64.efi

md/1: __________________________________________________________________________

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

md/0: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: /dev/md0 jest już zamontowany lub MDRaid/md/0 jest zajęty
mount: według mtaba /dev/md0 jest zamontowany w /

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 128.0 GB, 128035676160 bytes
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 15566, w sumie sektorów: 250069680
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                   1   250,069,679   250,069,679  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1           2,048   214,843,391   214,841,344 RAID partition (Linux)
/dev/sda2     214,843,392   216,797,183     1,953,792 RAID partition (Linux)
/dev/sda3     216,797,184   218,750,975     1,953,792 Data partition (Linux)

Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 14593, w sumie sektorów: 234441648
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                   1   234,441,647   234,441,647  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sdb1           2,048   214,843,391   214,841,344 RAID partition (Linux)
/dev/sdb2     214,843,392   216,797,183     1,953,792 RAID partition (Linux)

Drive: sdc _____________________________________________________________________

Disk /dev/sdc: 16.0 GB, 16008609792 bytes
głowic: 255, sektorów/ścieżkę: 63, cylindrów: 1946, w sumie sektorów: 31266816
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/sdc1    *             63    31,262,489    31,262,427   c W95 FAT32 (LBA)


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/md0         445dc453-ab16-4eba-93fc-be4d4c3b5e84   ext4       
/dev/md1         ceb94970-dff9-4c20-9a70-52d897c5165d   swap       
/dev/sda1        e91c2486-fa0f-0d70-2843-82579466a5da   linux_raid_member ubuntu:0
/dev/sda2        d1594378-6dc3-9a94-0c49-244d617bf66e   linux_raid_member ubuntu:1
/dev/sda3        0882c25e-5ece-4581-a0a0-149e67bb2926   ext4       
/dev/sdb1        e91c2486-fa0f-0d70-2843-82579466a5da   linux_raid_member ubuntu:0
/dev/sdb2        d1594378-6dc3-9a94-0c49-244d617bf66e   linux_raid_member ubuntu:1
/dev/sdc1        1D19-3F2E                              vfat       UUI

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

Device           Mount_Point              Type       Options

/dev/md0         /                        ext4       (rw,errors=remount-ro)
/dev/sda3        /boot                    ext4       (rw)
/dev/sdc1        /media/vic/UUI           vfat       (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)


============================= sda3/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
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

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 {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod part_gpt
insmod diskfilter
insmod mdraid1x
insmod ext2
set root='mduuid/e91c2486fa0f0d70284382579466a5da'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='mduuid/e91c2486fa0f0d70284382579466a5da'  445dc453-ab16-4eba-93fc-be4d4c3b5e84
else
  search --no-floppy --fs-uuid --set=root 445dc453-ab16-4eba-93fc-be4d4c3b5e84
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=pl_PL
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/09_lowlatency ###
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

### END /etc/grub.d/09_lowlatency ###

### 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
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-445dc453-ab16-4eba-93fc-be4d4c3b5e84' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  0882c25e-5ece-4581-a0a0-149e67bb2926
	else
	  search --no-floppy --fs-uuid --set=root 0882c25e-5ece-4581-a0a0-149e67bb2926
	fi
	linux	/vmlinuz-3.13.0-24-generic.efi.signed root=UUID=445dc453-ab16-4eba-93fc-be4d4c3b5e84 ro  nomdmonddf nomdmonisw nomdmonddf nomdmonisw
	initrd	/initrd.img-3.13.0-24-generic
}
submenu 'Opcje zaawansowane dla systemu Ubuntu' $menuentry_id_option 'gnulinux-advanced-445dc453-ab16-4eba-93fc-be4d4c3b5e84' {
	menuentry 'Ubuntu, za pomocą systemu Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-445dc453-ab16-4eba-93fc-be4d4c3b5e84' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  0882c25e-5ece-4581-a0a0-149e67bb2926
		else
		  search --no-floppy --fs-uuid --set=root 0882c25e-5ece-4581-a0a0-149e67bb2926
		fi
		echo	'Wczytywanie systemu Linux 3.13.0-24-generic...'
		linux	/vmlinuz-3.13.0-24-generic.efi.signed root=UUID=445dc453-ab16-4eba-93fc-be4d4c3b5e84 ro  nomdmonddf nomdmonisw nomdmonddf nomdmonisw
		echo	'Wczytywanie początkowego dysku RAM...'
		initrd	/initrd.img-3.13.0-24-generic
	}
	menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-recovery-445dc453-ab16-4eba-93fc-be4d4c3b5e84' {
		recordfail
		load_video
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  0882c25e-5ece-4581-a0a0-149e67bb2926
		else
		  search --no-floppy --fs-uuid --set=root 0882c25e-5ece-4581-a0a0-149e67bb2926
		fi
		echo	'Wczytywanie systemu Linux 3.13.0-24-generic...'
		linux	/vmlinuz-3.13.0-24-generic.efi.signed root=UUID=445dc453-ab16-4eba-93fc-be4d4c3b5e84 ro recovery nomodeset 
		echo	'Wczytywanie początkowego dysku RAM...'
		initrd	/initrd.img-3.13.0-24-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+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### 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  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)


=========================== sdc1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------

if loadfont /boot/grub/font.pf2 ; then
	set gfxmode=auto
	insmod efi_gop
	insmod efi_uga
	insmod gfxterm
	terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Install Ubuntu Server" {
	set gfxpayload=keep
	linux /install/netboot/ubuntu-installer/amd64/linux cdrom-detect/try-usb=true noprompt NULL=vmlinuz  file=/cdrom/preseed/ubuntu-server.seed quiet --
	initrd /install/netboot/ubuntu-installer/amd64/initrd.gz
}
menuentry "OEM install (for manufacturers)" {
	set gfxpayload=keep
	linux /install/netboot/ubuntu-installer/amd64/linux cdrom-detect/try-usb=true noprompt NULL=vmlinuz  file=/cdrom/preseed/ubuntu-server.seed quiet oem-config/enable=true --
	initrd /install/netboot/ubuntu-installer/amd64/initrd.gz
}
menuentry "Multiple server install with MAAS" {
	set gfxpayload=keep
	linux /install/netboot/ubuntu-installer/amd64/linux cdrom-detect/try-usb=true noprompt NULL=vmlinuz  modules=maas-enlist-udeb vga=788 initrd=/install/initrd.gz quiet --
	initrd /install/netboot/ubuntu-installer/amd64/initrd.gz
}
menuentry "Check disc for defects" {
	set gfxpayload=keep
	linux /install/netboot/ubuntu-installer/amd64/linux cdrom-detect/try-usb=true noprompt NULL=vmlinuz  MENU=/bin/cdrom-checker-menu quiet --
	initrd /install/netboot/ubuntu-installer/amd64/initrd.gz
}
menuentry "Rescue a broken system" {
	set gfxpayload=keep
	linux /install/netboot/ubuntu-installer/amd64/linux cdrom-detect/try-usb=true noprompt NULL=vmlinuz  rescue/enable=true --
	initrd /install/netboot/ubuntu-installer/amd64/initrd.gz
}
--------------------------------------------------------------------------------

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

           GiB - GB             File                                 Fragment(s)


======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sdb1

00000000  05 01 02 00 a6 00 00 00  eb 03 e0 00 d0 00 00 00  |................|
00000010  00 00 00 00 04 00 00 00  01 00 00 04 00 00 00 00  |................|
00000020  00 00 00 00 ff ff ff ff  ff ff ff ff ad 35 00 00  |.............5..|
00000030  01 00 00 00 00 00 00 00  68 00 00 00 00 00 00 00  |........h.......|
00000040  01 00 00 00 00 00 00 00  20 1e d9 07 01 10 0c 11  |........ .......|
00000050  13 00 00 00 20 1e d9 07  01 10 0c 11 13 00 00 00  |.... ...........|
00000060  20 1e d9 07 01 10 0c 11  13 00 00 00 01 00 00 00  | ...............|
00000070  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000080  00 2a 4d 69 63 72 6f 73  6f 66 74 20 43 44 49 4d  |.*Microsoft CDIM|
00000090  41 47 45 20 55 44 46 00  06 00 00 00 00 00 00 00  |AGE UDF.........|
000000a0  3d 03 00 00 00 00 00 00  38 00 00 00 08 00 00 00  |=.......8.......|
000000b0  06 01 02 00 fe 00 00 00  2c f1 08 00 d0 00 00 00  |........,.......|
000000c0  38 00 00 00 38 00 00 00  05 00 00 00 01 00 00 00  |8...8...........|
000000d0  20 00 00 00 0c 00 00 00  01 00 00 00 20 1e d9 07  | ........... ...|
000000e0  01 10 0c 11 13 00 00 00  68 00 00 00 d1 00 00 00  |........h.......|
000000f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200


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

cat: /tmp/BootInfo-HYhxOa4l/Tmp_Log: Nie ma takiego pliku ani katalogu
cat: /tmp/BootInfo-HYhxOa4l/Tmp_Log: Nie ma takiego pliku ani katalogu
Ronin12
Piegowaty Guziec
Piegowaty Guziec
Posty: 8
Rejestracja: 20 cze 2013, 11:43

Re: Naprawa/przeniesienie Gruba z USB na dysk (partycje /boot na sda3)

Post autor: Ronin12 »

Dzięki. No temat 'zdechł'.
W Gparted widzę jednak, że mój jeden dysk ma jakiś wykrzyknik więc nie mam pewności co do poprawności zainstalowania się tego systemu, a że jest świeży to może po prostu spróbuję jeszcze raz. A co do programu Grub Customizer, jak i Boot Repair to nie udało mi się bo wyskakują jakieś błędy

Kod: Zaznacz cały

Installing for i386-pc platform.
grub-install: uwaga: System plików "ext2" nie obsługuje osadzania.
grub-install: uwaga: Osadzanie nie jest możliwe. Program GRUB może być instalowany z tymi ustawieniami tylko używając list blokowania. Jednakże, listy blokowania są NIEPEWNE, a ich używanie jest niezalecane..
grub-install: błąd: nie zostanie kontynuowane za pomocą list blokowania.
vic@ubuntu:~$ sudo add-apt-repository ppa:yannubuntu/boot-repair
 Simple tool to repair frequent boot problems.
więc może to faktycznie wina instalacji..?
ODPOWIEDZ

Wróć do „Instalacja, aktualizacja i konfiguracja Ubuntu”

Kto jest online

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