PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > Always falling to grub prompt
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

Always falling to grub prompt

Réponse
 
LinkBack Outils de la discussion
Vieux 14/09/2007, 23h10   #26
Haines Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Small USB stick system

Andrei Popescu <andreimpopescu@gmail.com> writes:

> On Sun, Sep 09, 2007 at 03:57:56PM -0400, Haines Brown wrote:


> > Suppose one wanted one usb-key to serve the two main purposes of
> > having one: system maintenance and installation. I see directions for


> AFAIK the Live Debian project was working on including the debian
> installer in the live image. Then you should be able to start an
> installation from the booted live system. Is that what you need?


I apologize for not thanking Andrei for his reply. I'm currently
installing debian on the key, and I guess I'll just have to wait until
the folks developing the live image include the installer.

--

Haines Brown, KB1GRM





--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 14/09/2007, 23h50   #27
Andrei Popescu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Small USB stick system

On Fri, Sep 14, 2007 at 05:02:15PM -0400, Haines Brown wrote:
> Andrei Popescu <andreimpopescu@gmail.com> writes:
>
> > On Sun, Sep 09, 2007 at 03:57:56PM -0400, Haines Brown wrote:

>
> > > Suppose one wanted one usb-key to serve the two main purposes of
> > > having one: system maintenance and installation. I see directions for

>
> > AFAIK the Live Debian project was working on including the debian
> > installer in the live image. Then you should be able to start an
> > installation from the booted live system. Is that what you need?

>
> I apologize for not thanking Andrei for his reply. I'm currently
> installing debian on the key, and I guess I'll just have to wait until
> the folks developing the live image include the installer.


Hey, no need to be so formal

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG6wHIqJyztHCFm9kRAl3RAKCFGYmgIEUq1K5KyuiuAw 2qrN2OdgCglDEt
Rq9ppqj91Z5Pf1UCzbBltyI=
=ELQD
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 15/09/2007, 09h00   #28
Victor Munoz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut UPDATE: Always falling to grub prompt (now I don't even have prompt)

On Mon, Sep 10, 2007 at 09:50:49AM -0700, Andrew Sackville-West wrote:
> I'm not positive that gparted will move the beginning of a partition,
> but its certainly worth a shot. This is what I'd do:
>
> 1. Backup everything.
> 2. Review 1 several times.
> 3. launch a live-cd (knoppix or somesuch)
> 4. use a partition editor (gparted, qtparted, whatever) to rezise the
> existing / partition by moving the start of it up 500MB or so.
> 5. create a new bootable partition at the front of the device.
> 6. create a fs on the new partition
> 7. mount the new and old partitions.
> 8. copy over all of /mnt/old-part/boot to /mnt/new-part
> 9. edit up /mnt/old-part/etc/fstab
> 10. umount /mnt/new-part and remount it on /mnt/old-part/boot
> 11. chroot into /mnt/old-part
> 12. update-grub or manually edit /boot/grub/menu.lst to reflect new
> root partitions in kernel=lines
> 13. maybe have to run update-initrdfs to fix-up the initrd for new root
> partition.
> 14. reboot...


Thank you very much for the very detailed response. I have spent the
last couple of days trying to fix this, but still I can't.

The first problem, creating a bootable partition at the beginning of
the disk, is already solved. GParted is actually an amazing tool.
Anyway, I had a Debian Etch Live CD, and the GParted version on it
didn't work (can't move the beginning of a partition).
So I had to download a gparted Live CD (0.3.4-8), and it did the job
(took a couple of hours, though).

I then did all the other steps. I edited fstab, menu.lst, and ran
update-initramfs. Initially, the /boot partition was named /dev/hdd3,
but running fdisk I could change the order, and now it's /dev/hdd1
(/boot, 500 Mb), /dev/hdd2 (/, 160G), and /dev/hdd3 (swap).

However, when I boot, I get to the grub stage 1.5 line, then "Error
15" (no further explanaition), and nothing, not even the grub prompt.
I understand Error 15 means some file not found, but don't know what
to do.

Currently, my /etc/fstab is:

/dev/hdd2 / ext3 defaults,errors=remount-ro 0 1
/dev/hdd1 /boot ext3 defaults,errors=remount-ro 0 2
/dev/hdd3 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/hda /media/cdrom udf,iso9660 user,noauto 0 0
/dev/fda /media/floppy auto rw,user,noauto 0 0

All menu.lst entries are of the form:

root (hd1,1)
kernel /boot/vmlinuz-<version> root=/dev/hdd2 ro
initrd /boot/initrd.img-<version>

And device.map is, as before:

(hd0) /dev/hdc
(hd1) /dev/hdd

And I have two bootable partitions, /dev/hdc (Windows), and /dev/hdd1
(/boot partition).

I've tried several things: boot from Debian Live CD/Etch Disk 1/Gparted Live
CD, then change the order of entries in /etc/fstab,
changing the pass-number parameter in /etc/fstab (hdd1 and hdd2
had pass number 1, and I changed it to be 2 and 1, respectively, have
run update-initramfs again, but nothing.

I understand that, now that partitions are in order, /dev/hdd2, which
is the root filesystem according to fstab, will be (hd1,1) for grub, and
that kernels should be found in (hd1,1)/boot/, thus the "kernel" line
in menu.lst should be /boot/vmlinuz, if root="(hd1,1)". Right?

Until now, the only strange thing is that 'update-initramfs -k "all"
-u' yields some "grep: /proc/modules No such file or directory" errors
for each kernel, but don't know if that's relevant.

Sorry to keep bothering with this, but it's still not solved, I've
googled a lot, and can't find something that works.

Victor




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 15/09/2007, 10h40   #29
Hans Hofker
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: UPDATE: Always falling to grub prompt (now I don't even have prompt)

Victor Munoz wrote:
> Currently, my /etc/fstab is:
>
> /dev/hdd2 / ext3 defaults,errors=remount-ro 0 1
> /dev/hdd1 /boot ext3 defaults,errors=remount-ro 0 2
> /dev/hdd3 none swap sw 0 0
> proc /proc proc defaults 0 0
> /dev/hda /media/cdrom udf,iso9660 user,noauto 0 0
> /dev/fda /media/floppy auto rw,user,noauto 0 0
>
> All menu.lst entries are of the form:
>
> root (hd1,1)
> kernel /boot/vmlinuz-<version> root=/dev/hdd2 ro
> initrd /boot/initrd.img-<version>
>
> And device.map is, as before:
>
> (hd0) /dev/hdc
> (hd1) /dev/hdd
>
> And I have two bootable partitions, /dev/hdc (Windows), and /dev/hdd1
> (/boot partition).
>
> I've tried several things: boot from Debian Live CD/Etch Disk 1/Gparted Live
> CD, then change the order of entries in /etc/fstab,
> changing the pass-number parameter in /etc/fstab (hdd1 and hdd2
> had pass number 1, and I changed it to be 2 and 1, respectively, have
> run update-initramfs again, but nothing.
>
> I understand that, now that partitions are in order, /dev/hdd2, which
> is the root filesystem according to fstab, will be (hd1,1) for grub, and
> that kernels should be found in (hd1,1)/boot/, thus the "kernel" line
> in menu.lst should be /boot/vmlinuz, if root="(hd1,1)". Right?
>

I think the 'root' command should specify the partition where the boot
directory is located, so it should be (hd1,0) rather than (hd1,1).
Furthermore, the kernels are not located on the hdd2-partition, so they
are not in (hd1,1)/boot/, but they are in (hd1,0)/
So you could try to change your entries in menu.lst to:

root (hd1,0)
kernel (hd1,0)/vmlinuz-<version> root=/dev/hdd2 ro
initrd (hd1,0)/initrd.img-<version>

or, omitting the device-specification in the 'kernel' and 'initrd'
command (since the device is equal to the root device):

root (hd1,0)
kernel /vmlinuz-<version> root=/dev/hdd2 ro
initrd /initrd.img-<version>



--
Regards,
Hans.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 15/09/2007, 17h30   #30
Victor Munoz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: UPDATE: Always falling to grub prompt (now I don't even have prompt)

On Sat, Sep 15, 2007 at 10:39:35AM +0200, Hans Hofker wrote:
> >

> I think the 'root' command should specify the partition where the boot
> directory is located, so it should be (hd1,0) rather than (hd1,1).
> Furthermore, the kernels are not located on the hdd2-partition, so they
> are not in (hd1,1)/boot/, but they are in (hd1,0)/
> So you could try to change your entries in menu.lst to:
>
> root (hd1,0)
> kernel (hd1,0)/vmlinuz-<version> root=/dev/hdd2 ro
> initrd (hd1,0)/initrd.img-<version>
>
> or, omitting the device-specification in the 'kernel' and 'initrd'
> command (since the device is equal to the root device):
>
> root (hd1,0)
> kernel /vmlinuz-<version> root=/dev/hdd2 ro
> initrd /initrd.img-<version>
>


Thanks, but it didn't work either. I had tried before, anyway. I could
reinstall Debian, after all I have a backup of /home, but I
feel it's only a little detail somewhere that's missing, and I'd
prefer not to do that.

Victor


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 15/09/2007, 19h30   #31
Victor Munoz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut SOLVED: Always falling to grub prompt

Finally my problem is solved.

The problem was that I had to reinstall grub in the MBR of the first
disk, *telling it that /boot was in a different partition*. I booted
from a LiveCD (I was using GParted's one, as it booted faster than the rescue
option of Debian's LiveCD, and I had to boot quite a few times in the
last hours), then typed "grub". This led to the grub prompt. I set the
root device to (hd1,0), since this is the boot partition (where
grub/stage1 file is):

grub> root (hd1,0)

And then I install grub in the MBR of *the first disk*, where Windows
is installed, and quit the grub shell:

grub> setup (hd0)
grub> quit

Then reboot, and... voila, the grub menu I was missing so much, after
one week of absense. All my kernels and Windows are booting normally,
and I'm very happy. Thanks to all those of you who ed. It was
really difficult to be sure what to do just by browsing the web. Two
particularly useful websites were the grub manual,
http://www.gnu.org/software/grub/man...-GRUB-natively,
and
http://www.terabyteunlimited.com/kb/article.php?id=232

Anyway, for the record, for anyone browsing the web,
here is a "short" summary of this adventure :-)

1. Initial setup:
hda : cdrom
hdc1 : Windows partition in first disk (10G)
hdd1 : Linux bootable partition in second disk (160G)
hdd2 : Linux swap in second disk

2. The problem:
Some kernel upgrade left the system unbootable. Booting with the
new kernel led to Error 18 (more cylinders than BIOS can manage).
Old kernel booted. Subsequent kernel upgrades and playing with
menu.lst completed the mess. In the end, I had two kernels (the
oldest and the newest) booting, and two kernels with Error 18.
None of them booted normally, though, and I always got the grub
prompt. I had to manually give "root", "kernel", "initrd" and
"boot" commands at the prompt, to boot.

3. The diagnostics:
As someone pointed out, kernels and menu.lst must
have been written beyond the zone visible by the BIOS, so after
months of normal operation, suddenly I could not boot.

4. Solution (first step):
Following suggestions from this list, I left a small boot partition
at the beginning of /dev/hdd. I used GParted Live CD 0.3.4-8, which
was able (amazingly) to move the beginning of the /dev/hdd1
partition. I left 500 M free. With GParted, I set it as ext3. After
"executing pending actions", which meant 1h40m of waiting until the
resize of hdd1 completed, I had a new "/dev/hdd3" partition at
the beginning of the 160G disk. Then I set the bootable flag on it,
also with GParted.

Now open a terminal, and followed the suggestions I received:

- Mounted both partitions, /dev/hdd3 as /mnt/new-part and /dev/hdd1 as
/mnt/old-part.
- Copy /mnt/old-part/boot/* to /mnt/new-part
- Moved /mnt/old-part/boot to /mnt/old-part/old-boot,
then mkdir /mnt/old-part/boot [probably not necessary?].
- Edit /mnt/old-part/fstab (see later for the final setup that works)
- Umount /mnt/new-part, remount on /mnt/old-part/boot
- Chroot into /mnt/old-part
- Edited menu.lst (see later for the final setup that works)

I rebuilt initrd's:
update-initramfs -k "all" -u

5. Solution (second, probably unnecessary, step)

The previous procedure didn't work, and I was still left with an
unbootable system. It failed with "Error 15", and not even got a
grub prompt. I thought there was a problem with partition order,
and I fixed that. fstab and menu.lst were edited accordingly,
and that's the setup that is working now, but I don't think
this step was necessary. Anyway:

fdisk /dev/hdd

Used commands: m (menu), p (print partition table), x (extra
functionality), f (fix partition order),
w (write partition table to disk)

Final /etc/fstab:

/dev/hdd2 / ext3 defaults,errors=remount-ro 0 1
/dev/hdd1 /boot ext3 defaults,errors=remount-ro 0 2
/dev/hdd3 none swap sw 0 0
[other lines]

Final /boot/grub/device.map:

(hd0) /dev/hdc
(hd1) /dev/hdd

Final /boot/grub/menu.lst [only relevant lines]:

[...]
# kopt=root=/dev/hdd2 ro
[...]
# groot=(hd1,0)
[...]
root (hd1,0)
kernel /vmlinuz-<version> root=/dev/hdd2 ro
initrd /initrd.img-<version>
savedefault
[...]
title Windows
root (hd0,0)
savedefault
makeactive
chainloader +1

6. Solution (third and final, and critical, step)

The problem persisted, and the solution was to reinstall grub
in the MBR of the first disk (hd0, hdc), with root in (hd0,1) [hdd]:

After booting from LiveCD:

# grub
grub> root (hd0,1)
grub> setup (hd0)
grub> quit
#

Ok, that's it. Thanks again for the .

Victor




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h28.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16588 seconds with 14 queries