Skocz do zawartości

Grub + 2 Gnu/linuksy + Windows


velmafia

Rekomendowane odpowiedzi

Witam

 

ostatnio postanowiłem pobawić się z innym OSem, i wypadło na Debiana

zainstalowałemn Debiana na innym dysku, ale nie odłączyłem starego dysku, Debiana zainstalowałęm na sdb, (Fedorke mam na sda) i gruba z Debiana też zainstalowałem na sdb, i wszystko było ładnie dopóki ni chciałem właczyć Fedory, bo wyskakiwał kernel panic, ale winda i Debian odpalały sie bez problemów, więc przeinstalowałem gruba (właśnie, jak się przeinstalowuje gruba w FC5??, bo próbowałem sposobów wypisanych na forym, próbowałem tak jak jest napisane w Wiki Fedory, i nie działały, dopiero znalazłem na necie opis z Auroxa, i dopiero on zadziałał, ale wróćmy do tematu) przeinstalowałem gruba i podczas włączania PC wyskoczył grub taki jak przed instalacją Debiana, wiec pomyślałem że bede musiał tylko dodać wpisy do Debiana, ale.. gdy wybrałem Fedore to zaczeło się uruchamiać jak Fedora żeby po chwili odpalił się Debian, czyli żle skonfigurowany grub, ale sprawdziłem i jest dobrze, po odłączeniu dysku z Debianem odpala sie normalnie Fedora, a z dyskiem z Debianem - Debian, a grub ten sam ;)

 

miał ktoś kiedyś takie coś ??, bo to mi wygląda jak w polskim rządzie "prawo takei same, ale zalezy kto siedzi w rządzie, to zasady się zmieniają" ;]

 

może ktoś mi pomóc zrobić to tak żeby to normalnie działało, czyli żeby w grubie były 3 systemy, i odpalał się ten który wybiorę, a nie wybieram Fedore awłacza sie Debian.

 

 

 

aloha

Odnośnik do komentarza
Udostępnij na innych stronach

Pokaż zawartość /boot/grub/grub.conf

Pokaż wynik fdisk -l przy podłączonych obu dyskach.

 

Przeinstalowałeś gruba. Teraz tylko pytanie, czy zrobiłeś chroota do instalki Fedory czy Debiana. Niezależnie od tego, który system się odpali wklej zawartość tego grub.conf, wtedy dopiszemy drugi :)

 

PS. Swoją drogą - Debian - dobry wybór :)

Odnośnik do komentarza
Udostępnij na innych stronach

jeżeli chrootowanie to to co myśle to chrootowałem z Fedory, tzn. najpierw zamontowałem partycje fedory, a potem ja chrootowałem, wiec chyba dobrze myśle?

 

/boot/grub/grub.conf (Fedory)

[root@velmafia grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda3
#          initrd /initrd-version.img
boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.17-1.2174_FC5)
        root (hd0,0)
        kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.17-1.2174_FC5.img
title Fedora Core (2.6.17-1.2157_FC5)
        root (hd0,0)
        kernel /vmlinuz-2.6.17-1.2157_FC5 ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.17-1.2157_FC5.img
title Windows
        rootnoverify (hd0,1)
        chainloader +1

 

coś mi tu nie pasuje:

 

[root@velmafia grub]# ls -l
razem 203
-rw-r--r-- 1 root root     38 sie 24 23:02 device.map
-rw-r--r-- 1 root root   7456 maj  4 23:56 e2fs_stage1_5
-rw-r--r-- 1 root root   7328 maj  4 23:56 fat_stage1_5
-rw-r--r-- 1 root root   6592 maj  4 23:56 ffs_stage1_5
-rw------- 1 root root    790 sie 24 23:04 grub.conf
-rw-r--r-- 1 root root   6592 maj  4 23:56 iso9660_stage1_5
-rw-r--r-- 1 root root   8032 maj  4 23:56 jfs_stage1_5
lrwxrwxrwx 1 root root     11 maj  4 23:56 menu.lst -> ./grub.conf     <==== a dokładnie tu mie to nie pasuje, tak ma być ???
-rw-r--r-- 1 root root   6752 maj  4 23:56 minix_stage1_5
-rw-r--r-- 1 root root   9056 maj  4 23:56 reiserfs_stage1_5
-rw-r--r-- 1 root root   7028 cze  6 18:56 splash.xpm.gz
-rw-r--r-- 1 root root    512 maj  4 23:56 stage1
-rw-r--r-- 1 root root 102332 maj  4 23:56 stage2
-rw-r--r-- 1 root root   6944 maj  4 23:56 ufs2_stage1_5
-rw-r--r-- 1 root root   6144 maj  4 23:56 vstafs_stage1_5
-rw-r--r-- 1 root root   8768 maj  4 23:56 xfs_stage1_5

 

 

w katalogu "/boot/grub/" Debiana nie znalazłem "grub.conf"

znalazłem podobny plik "menu.lst"

 

# menu.lst - See: grub(8), info grub, update-grub(8)
#			grub-install(8), grub-floppy(8),
#			grub-md5-crypt, /usr/share/doc/grub
#			and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default		 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		 5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#	  password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		 Windows 95/98/NT/2000
# root		  (hd0,0)
# makeactive
# chainloader   +1
#
# title		 Linux
# root		  (hd0,1)
# kernel		/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/sdb3 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##	  alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##	  lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##	  altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##	  howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##	  memtest86=false
# memtest86=true

## ## End Default Options ##

title		   Debian GNU/Linux, kernel 2.4.27-2-386
root			(hd1,0)
kernel		  /vmlinuz-2.4.27-2-386 root=/dev/sdb3 ro
initrd		  /initrd.img-2.4.27-2-386
savedefault
boot

title		   Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)
root			(hd1,0)
kernel		  /vmlinuz-2.4.27-2-386 root=/dev/sdb3 ro single
initrd		  /initrd.img-2.4.27-2-386
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		   Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title		   Microsoft Windows XP Professional
root			(hd0,1)
savedefault
makeactive
chainloader	 +1


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
title		   Fedora Core release 5 (Bordeaux) (on /dev/sda3)
root			(hd0,0)
kernel		  /vmlinuz-2.6.17-1.2157_FC5 root=/dev/sda3
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda3.
title		   Fedora Core release 5 (Bordeaux) (on /dev/sda3)
root			(hd0,0)
kernel		  /vmlinuz-2.6.17-1.2174_FC5 root=/dev/sda3
savedefault
boot

 

no i jeszce "fdisk -l"


Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          13      104391   83  Linux
/dev/sda2   *          14        1288    10241437+   c  W95 FAT32 (LBA)
/dev/sda3            1289        2571    10305697+  83  Linux
/dev/sda4            2572       19457   135636795    5  Extended
/dev/sda5            2572       12060    76220361   83  Linux
/dev/sda6           12061       18434    51199123+  83  Linux
/dev/sda7           18435       19425     7960176   83  Linux
/dev/sda8           19426       19457      257008+  82  Linux swap / Solaris

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          12       96358+  83  Linux
/dev/sdb2            2445       30401   224564602+   5  Extended
/dev/sdb3              13        1228     9767520   83  Linux
/dev/sdb4            1229        2444     9767520   83  Linux
/dev/sdb5           19198       30401    89996098+  83  Linux
/dev/sdb6           19137       19197      489951   82  Linux swap / Solaris
/dev/sdb7            2445       19135   134070394+  83  Linux

Partition table entries are not in disk order

 

sda - dysk z fedorą

sdb - dysk z debianem

 

 

uzywaj codebox dla dlugich lisstingow kodu - uosiu

Odnośnik do komentarza
Udostępnij na innych stronach

A nie masz przypadkiem takich samych labeli partycji? Sprawdź...

a jak to sprawdzić ?? bo nie wie o co dokładnie chodzi.

 

nie zwróciłem uwagi na jakim jądrze się uruchamia Debian, zaraz sprawdzę

 

 

 

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

edit

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

 

tak, Debian odpala sie na jądrze Fedory (i działa bez problemów)lol, co mam teraz z tym zrobić ??

Odnośnik do komentarza
Udostępnij na innych stronach

Spróbowałbym skopiować wpisy z gruba debiana do gruba fedory. A właściwie zamienił

kernel /vmlinuz-2.6.17-1.2157_FC5 ro root=LABEL=/ rhgb quiet

na odpowiednią linijkę z debiana. Chodzi o to, żeby nie było tego LABEL, oznaczenie partycji /dev/sdxZ. Może zadziała.

Odnośnik do komentarza
Udostępnij na innych stronach

do gruba z FC dopisałem:

 


title           Debian GNU/Linux, kernel 2.4.27-2-386
root            (hd1,0)
kernel          /vmlinuz-2.4.27-2-386 root=/dev/sdb3 ro
initrd          /initrd.img-2.4.27-2-386

title           Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)
root            (hd1,0)
kernel          /vmlinuz-2.4.27-2-386 root=/dev/sdb3 ro single
initrd          /initrd.img-2.4.27-2-386

 

i Debian odpala się już normalnie na swojim jajku, ale jak wybieram Fedore i mam podłączony dyskz Debiane, to znowu odpala się Debian na jajku Fedory, więc zniemiłem linijke:

 

kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=LABEL=/ rhgb quiet

 

na

 

kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/sda1=/ rhgb quiet

 

i system nie wstaje,wyskakuje taki błąd

 

Unable to access resume device (LABEL=SWAP-sda8)
mount: could not find filesystem '/dev/root'
setoproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: Nosuch file or directory
Kernel panic - not syncing: Attempted to kill init!

 

 

więc nie wiem co mam dokładnie tu wpisać

Odnośnik do komentarza
Udostępnij na innych stronach

:)

 

kernel /vmlinuz-2.6.17-1.2174_FC5 root=/dev/sda3 rhgb quiet

 

zamiast

 

kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/sda1=/ rhgb quiet

 

albo jakis inny numer partycji.

 

A dokladniej:

title Fedora Core (2.6.17-1.2174_FC5)
        root (hd0,0)
        kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/sda3 rhgb quiet
        initrd /initrd-2.6.17-1.2174_FC5.img

 

Po prostu zeby nie odwolywal sie do partycji po etykiecie. Sorry, ze mieszam, ale powinienem dawno spac a niestety na to sie nie zanosi.

Odnośnik do komentarza
Udostępnij na innych stronach

dzięki, zadziałało

kernel /vmlinuz-2.6.17-1.2174_FC5 root=/dev/sda3 rhgb quiet

 

chociaż

kernel /vmlinuz-2.6.17-1.2174_FC5 root=/dev/sda3=/ rhgb quiet

nie działałało

 

ale teraz działa tak jak powinno, a moj grub.conf wygląda tak (jak by ktoś kiedyś potrzebował ;) ) :

[root@velmafia ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#		  all kernel and initrd paths are relative to /boot/, eg.
#		  root (hd0,0)
#		  kernel /vmlinuz-version ro root=/dev/sda3
#		  initrd /initrd-version.img
boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.17-1.2174_FC5)
	root (hd0,0)
	kernel /vmlinuz-2.6.17-1.2174_FC5 ro root=/dev/sda3 rhgb quiet
	initrd /initrd-2.6.17-1.2174_FC5.img
title Fedora Core (2.6.17-1.2157_FC5)
	root (hd0,0)
	kernel /vmlinuz-2.6.17-1.2157_FC5 ro root=LABEL=/ rhgb quiet   <== w razie jak bym potrzebował Debiana z innym jądrem;]
	initrd /initrd-2.6.17-1.2157_FC5.img
title Windows
	rootnoverify (hd0,1)
	chainloader +1


title		   Debian GNU/Linux, kernel 2.4.27-2-386
root			(hd1,0)
kernel		  /vmlinuz-2.4.27-2-386 root=/dev/sdb3 ro
initrd		  /initrd.img-2.4.27-2-386

title		   Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)
root			(hd1,0)
kernel		  /vmlinuz-2.4.27-2-386 root=/dev/sdb3 ro single
initrd		  /initrd.img-2.4.27-2-386

 

 

aż tak bardzo nie mieszałeś ;],

@wojtekjs - dzięki za pomoc

 

PS.

czy to normalne że jądro z jednej dystrybucji pasuje do drugiej, (jądro jest na architekturze x86_64, a system i386) ?

 

aloha

 

uzywaj codebox dla dlugich listingow - uosiu

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
×
×
  • Dodaj nową pozycję...