Титла: Неуспешен преход от lilo към GRUB Публикувано от: Tarek в Sep 24, 2004, 15:02 Реших да сменя lilo с GRUB. Имам инсталиран Дебиан, като hda1=winXP, hda2=swap,hda3=linux и ReiserFS. Следвах указанията от Книгата за Дебиан при замяна на lilo с GRUB. Добавих допълнително в grub.list и редове за зареждане на Уин. При рестарт Уиндоуса си зарежда нормално, а Линукс не може. Изписва се следното при зареждане на ядро 2.6.7:
............................................... RAMDISK: Compressed image found at block 0 RAMDISK: incomplete write (-28! = 32768) 4194304 kernel panic: VFS: Unable to mount root fs on hda3 Титла: Неуспешен преход от lilo към GRUB Публикувано от: в Sep 24, 2004, 16:45 Дай menu.lst, де!
Не се скъпи и на обяснения. Откъде да знам какво си написал в menu.lst или grub.conf. Дай ги и двата. Титла: Неуспешен преход от lilo към GRUB Публикувано от: в Sep 24, 2004, 20:08 Щом търси RAMDISK, значи ядрото ти е с initrd...
Добави и него с един ред в menu.lst подобно на lilo.conf... Не пишеше ли някъде в книжката да си държиш под ръка старото лило.конф? ![]() Ако не знаеш как, дай да видим menu.lst както по-горе вече ти казаха... Титла: Неуспешен преход от lilo към GRUB Публикувано от: Tarek в Sep 24, 2004, 20:21 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 optons 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/hda3 ro ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,2) ## 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 ## ## End Default Options ## title Debian GNU/Linux, kernel root (hd0,2) kernel /boot/vmlinuz root=/dev/hda3 ro initrd /boot/initrd.img savedefault boot title Debian GNU/Linux, kernel (recovery mode) root (hd0,2) kernel /boot/vmlinuz root=/dev/hda3 ro single initrd /boot/initrd.img savedefault boot title Debian GNU/Linux, kernel 2.6.7 root (hd0,2) kernel /boot/vmlinuz-2.6.7 root=/dev/hda3 ro initrd /boot/initrd.img-2.6.7 savedefault boot title Debian GNU/Linux, kernel 2.6.7 (recovery mode) root (hd0,2) kernel /boot/vmlinuz-2.6.7 root=/dev/hda3 ro single initrd /boot/initrd.img-2.6.7 savedefault boot title Debian GNU/Linux, kernel 2.4.27 root (hd0,2) kernel /boot/vmlinuz-2.4.27 root=/dev/hda3 ro initrd /boot/initrd.img-2.4.27 savedefault boot title Debian GNU/Linux, kernel 2.4.27 (recovery mode) root (hd0,2) kernel /boot/vmlinuz-2.4.27 root=/dev/hda3 ro single initrd /boot/initrd.img-2.4.27 savedefault boot ### END DEBIAN AUTOMAGIC KERNELS LIST title Windows XP root (hd0,0) makeactive chainloader +1 Опитах се да намеря grub.conf в /etc, но не успях. За да вляза в hda3 използвах диска на Кнопикс 3.6. Ето и стария lilo.conf преди да заменя lilo с grub: # /etc/lilo.conf - See: 'lilo(8)' and 'lilo.conf(5)', # --------------- 'install-mbr(8)', '/usr/share/doc/lilo/', # and '/usr/share/doc/mbr/'. # +---------------------------------------------------------------+ # | !! Reminder !! | # | | # | Don't forget to run 'lilo' after you make changes to this | # | conffile, '/boot/bootmess.txt', or install a new kernel. The | # | computer will most likely fail to boot if a kernel-image | # | post-install script or you don't remember to run 'lilo'. | # | | # +---------------------------------------------------------------+ # Support LBA for large hard disks. # lba32 # Overrides the default mapping between harddisk names and the BIOS' # harddisk order. Use with caution. #disk=/dev/hde # bios=0x81 #disk=/dev/sda # bios=0x80 # Specifies the boot device. This is where Lilo installs its boot # block. It can be either a partition, or the raw device, in which # case it installs in the MBR, and will overwrite the current MBR. # boot=/dev/hda # Specifies the device that should be mounted as root. ('/' ![]() # root=/dev/hda3 # Enable map compaction: # Tries to merge read requests for adjacent sectors into a single # read request. This drastically reduces load time and keeps the # map smaller. Using 'compact' is especially recommended when # booting from a floppy disk. It is disabled here by default # because it doesn't always work. # # compact # Default menu for Debian. (Using the images from debian-bootscreen) # from Philipp Wolfer <phil@newswriter.org>. bitmap=/usr/share/lilo/debianlilo.bmp bmp-colors=1,,0,2,,0 bmp-table=120p,173p,1,15,17 bmp-timer=254p,432p,1,0,0 # Install the specified file as the new boot sector. # LILO supports built in boot sectory, you only need # to specify the type, choose one from 'text', 'menu' or 'bitmap'. # new: install=bmp old: install=/boot/boot-bmp.b # new: install=text old: install=/boot/boot-text.b # new: install=menu old: install=/boot/boot-menu.b or boot.b # default: 'menu' is default, unless you have a bitmap= line # Note: install=bmp must be used to see the bitmap menu. # install=menu # install=bmp install=bmp # Specifies the number of _tenths_ of a second LILO should # wait before booting the first image. LILO # doesn't wait if DELAY is omitted or if DELAY is set to zero. delay=20 # Prompt to use certaing image. If prompt is specified without timeout, # boot will not take place unless you hit RETURN prompt timeout=50 # Specifies the location of the map file. If MAP is # omitted, a file /boot/map is used. map=/boot/map # Specifies the VGA text mode that should be selected when # booting. The following values are recognized (case is ignored): # NORMAL select normal 80x25 text mode. # EXTENDED select 80x50 text mode. The word EXTENDED can be # abbreviated to EXT. # ASK stop and ask for user input (at boot time). # <number> use the corresponding text mode. A list of available modes # can be obtained by booting with vga=ask and pressing [Enter]. vga=791 # You can set a password here, and uncomment the 'restricted' lines # in the image definitions below to make it so that a password must # be typed to boot anything but a default configuration. If a # command line is given, other than one specified by an 'append' # statement in 'lilo.conf', the password will be required, but a # standard default boot will not require one. # # This will, for instance, prevent anyone with access to the # console from booting with something like 'Linux init=/bin/sh', # and thus becoming 'root' without proper authorization. # # Note that if you really need this type of security, you will # likely also want to use 'install-mbr' to reconfigure the MBR # program, as well as set up your BIOS to disallow booting from # removable disk or CD-ROM, then put a password on getting into the # BIOS configuration as well. Please RTFM 'install-mbr(8)'. # # password=tatercounter2000 # You can put a customized boot message up if you like. If you use # 'prompt', and this computer may need to reboot unattended, you # must specify a 'timeout', or it will sit there forever waiting # for a keypress. 'single-key' goes with the 'alias' lines in the # 'image' configurations below. eg: You can press '1' to boot # 'Linux', '2' to boot 'LinuxOLD', if you uncomment the 'alias'. # # message=/boot/bootmess.txt # prompt # single-key # delay=100 # timeout=100 # Kernel command line options that apply to all installed images go # here. See: The 'boot-prompt-HOWO' and 'kernel-parameters.txt' in # the Linux kernel 'Documentation' directory. # # append="" # Boot up Linux by default. # default="Linux" image=/boot/vmlinuz label="Linux" initrd=/boot/initrd.img append="ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce " read-only image=/boot/vmlinuz-2.4.27 label="Linux(2.4)-1" initrd=/boot/initrd.img-2.4.27 append="ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce " read-only image=/boot/vmlinuz-2.6.7 label="Linux(2.6)-2" initrd=/boot/initrd.img-2.6.7 append="ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce " read-only image=/boot/vmlinuz-2.6.8-1-k7 label="Linux(2.6.8)-3" initrd=/boot/initrd.img-2.6.8-1-k7 append="ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce " read-only # If you have another OS on this machine to boot, you can uncomment the # following lines, changing the device name on the 'other' line to # where your other OS' partition is. # # other=/dev/hda4 # label=HURD # restricted # alias=3 other=/dev/hda1 label="WinXP/2K(hda1)" Титла: Неуспешен преход от lilo към GRUB Публикувано от: Tarek в Sep 24, 2004, 20:35 Предполагам, че има проблем с големината на RAMDISK. Разгледах документацията за grub и menu.lst, но опции подобни на тези в lilo.conf за RAMDISK не открих. Не знам как да реша проблема при положение, че дори не намирам файла grub.conf.
Титла: Неуспешен преход от lilo към GRUB Публикувано от: sunhater в Sep 25, 2004, 02:42 Аз имах същия проблем и си прекомпилирах кернела. Увеличих големината RAMDISK от 4096 нa 8192 и стана.
Титла: Неуспешен преход от lilo към GRUB Публикувано от: alex_c в Sep 25, 2004, 10:30 Да, sunhater е прав. Можеш, обаче, като последна проба преди да прекомпилираш ядрото, да опиташ да добавиш опцията за големина на ramdisk-a към реда в menu.lst (grub.conf вероятно няма да намериш, защото си имаш menu.lst - в някои дистрибуции вместо него използват grub.conf), например:
kernel /boot/vmlinuz root=/dev/hda3 ro single ramdisk_size=100000 Няма как да намериш тези опции в документацията за GRUB, защото те са параметри, подавани към ядрото и не зависят от boot-loader-a. Един друг вариант е да намалиш размера на ramdisk-a, като изхвърлиш от него всичко ненужно. Това става по следния начин: #cd /tmp #cp /boot/initrd.img-2.4.7 . Ако ramdisk-a е компресиран, трябва да го разкомпресираш: #mv initrd.img-2.4.7 initrd.img-2.4.7.gz #gunzip initrd.img-2.4.7.gz (ако не е - ще даде грешка) #mount -t ext2 initrd.img-2.4.7 /floppy -o loop Има вероятност файловата система на имиджа да не е ext2, затова ако не се монтира така, пробвай с cramfs: #mount -t cramfs initrd.img-2.4.7 /floppy -o loop Мястото на монтиране е по избор, да не те смущава това /floppy, просто при мен тази директория е свободна и знам, че няма да има проблем при монтирането. След това #ls /floppy Вероятно ще има нещо от рода: dev etc lib linuxrc lost+found mnt modules proc static Трябва да видиш къде са модулите, най-вероятно в modules: #ls /floppy/modules Ще видиш списък с модулите, които са набутани в имиджа: reiserfs.ko xfs.ko и т.н. Разгледай файла linuxrc (vi linuxrc) и прецени кои модули се зареждат (insmod ...). При теб, щом ползваш ReiserFS (като мен ;-)), ще то трябва модула reiserfs.ko. Ако искаш, можеш да оставиш още няколко модула за цвят (и някоя бъдеща коренова система от друг тип), всичко друго го изтриваш: #rm /floppy/modules/XXX.ko #rm /floppy/modules/XXX1.ko и т.н. След това демонтираш имиджа: #umount /floppy Компресираш го (опционално): #gzip -9 initrd.img-2.4.7 Преместваш стария за всеки случай: #mv /boot/initrd.img-2.4.7 /boot/initrd.img-2.4.7-old и копираш там новия: #cp initrd.img-2.4.7.gz /boot Ако си компресирал имиджа, не забравяш да отразиш това в menu.lst: initrd /boot/initrd.img-2.6.7.gz И ... рестартираш. Т.к. размера на ramdisk-a вече е значително намален, не би трябвало да се появяват тези страховити съобщения: kernel panic: VFS: Unable to mount root fs on hda3 Best wishes! Alex Титла: Неуспешен преход от lilo към GRUB Публикувано от: Tarek в Sep 25, 2004, 14:53 Благодаря за помощта на всички и особено на alex_c. Успях да се справя със зареждането на ядрото. Проблемът наистина бе в малкия размер на ramdisk. Следвах съветите на alex_c и добавих
в опциите за зареждане на ядрото ramdisk_size=100000: kernel /boot/vmlinuz root=/dev/hda3 ro single ramdisk_size=100000 С всеки изминал ден нараства уважението ми към хората, които пишат и помагат в този форум. Титла: Неуспешен преход от lilo към GRUB Публикувано от: в Sep 27, 2004, 20:33
погледни статията за файловите системи на сайта - в една от тях пишеше за проблеми на grub с reiserfs. а след това може да потърсиш и в мрежата - проблема (мисля) е известен и добре описан. |