GRUB 2 - Possible problems ahead

Help with issues regarding installation of Debian

Re: GRUB 2 - Possible problems ahead

Postby sgosnell » 2011-08-13 17:42

You do not need to change the BIOS settings. Just press Esc when the BIOS splash screen comes up, and you get a menu which lets you choose the drive you want to boot from, including removable drives. You can also change the default boot drive with the files in /boot/grub/. Read the grub2 documentation, not just the rantings of people who have problems because they won't read it.
sgosnell
 
Posts: 511
Joined: 2011-03-14 01:49

Re: GRUB 2 - Possible problems ahead

Postby pcalvert » 2011-08-13 17:59

Radvan wrote:(3) LILO - I have no experience with LILO. When I get stuck and boot managers fail, I will ask questions. Also, all are switching to GRUB 2 so that going elsewhere seems to be unwise.

You can use LILO as a "bridge" or "stepping stone." Install LILO into the PBR instead of the MBR when you install Squeeze. Then, after you boot into Squeeze for the first time, remove LILO and install the legacy version of GRUB.

Phil
"I never had an interest in being a mayor 'cause that's a real job. You have to produce.
That's why I was able to be a senator for 36 years." - U.S. Vice President Joe Biden
pcalvert
 
Posts: 1577
Joined: 2006-04-21 11:19
Location: Sol Sector

Re: GRUB 2 - Possible problems ahead

Postby Radvan » 2011-08-14 12:21

Debian Squeeze, Attempt #1:

- removing Debian from boot manager menu
- creating partitions using OS/2 fdisk (in fact, using partitions used for Lenny). This can help to prevent incompatibilities with aligning or LVM (Keith from Ubuntu has experienced both problems). The partitions were always okay both Lenny and for OS/2.
- expert install, Debian 6.0.2 netinst, installing on ext4, root ('/') 20G, /home 70 G, /swap 5G
- crash at chroot during downloading files from the net.
- trying again, crashing again. Also noting a strange partition in BM menu which should not be there.
- reinstalling Lenny, okay, rebooting - the strange partition has been gone for a change.
- rebooting, both OS/2 and Lenny work (thanks God)
- a quick attempt to find on the net what has happened. Finding nothing useful ( not finding something useful quick enough)
- writing on the forum :mrgreen:

Therefore, what happened? And what should I do when I crash again? And where comes that strange "bootable partition" in the BM menu from? Note that boot manager does not attempt to identify anything or decide what it shoud offer. It uses boot manager data prepared for it by the user. Note also, that OS/2 and boot manager are on /dev/sda while Squeeze was installed on /dev/sdb. During the installation, I haven't touched /dev/sda.

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

next attempt, failed:

chroot /target mount -t proc proc /proc

checking console at ctrl-alt-F4: "segmentation fault", section debootstrap

I have run memtest from rescatux (supposing that "segmentation fault" might be a page fault). After half a hour and (successfuly completed) "test #5", I gave up. It does not seem to be memory problem. If it is page fault then it is a chaos in page tables. I have also run fsck from rescatux. Both partitions (maybe) involved in installation ('/' and '/home') are okay.
User avatar
Radvan
 
Posts: 108
Joined: 2009-06-22 09:38
Location: Prague, Czech Republic

Re: GRUB 2 - Possible problems ahead

Postby pcalvert » 2011-08-15 17:06

Instead of trying to install Squeeze again, why not just upgrade Lenny to Squeeze? That way, you can avoid problems with the Debian installer and GRUB2 as well.

Phil
"I never had an interest in being a mayor 'cause that's a real job. You have to produce.
That's why I was able to be a senator for 36 years." - U.S. Vice President Joe Biden
pcalvert
 
Posts: 1577
Joined: 2006-04-21 11:19
Location: Sol Sector

Re: GRUB 2 - Possible problems ahead

Postby Radvan » 2011-08-16 06:05

Yes. A minor problem here: I am a Debian user rather than a Debian guru. I have seen several recipes how to upgrade, all of them involving editing system files, doing all from a console and performing a list of actions without having access to a web, where I could search for advices :roll: I don't think I am a coward and I am prepared to undergo such procedure but is there an enough simple recommendation how to upgrade somewhere? A list of instructions which I can put on a bit of paper and then try? Also, can I do the following

- install Lenny
- ctrl-alt-F1
- start upgrading

or should I shut down Gnome first? And if I should, how? And what else should I do first? You see, I am a real greenhorn :D
User avatar
Radvan
 
Posts: 108
Joined: 2009-06-22 09:38
Location: Prague, Czech Republic

Re: GRUB 2 - Possible problems ahead

Postby pcalvert » 2011-08-16 19:13

Did you already install Lenny, or was that just a test in a virtual machine?

If Lenny is installed now, do this in a terminal window:
Code: Select all
$ su
[Enter root password.]
# fdisk -l

Paste the output into your reply.

Phil
"I never had an interest in being a mayor 'cause that's a real job. You have to produce.
That's why I was able to be a senator for 36 years." - U.S. Vice President Joe Biden
pcalvert
 
Posts: 1577
Joined: 2006-04-21 11:19
Location: Sol Sector

Re: GRUB 2 - Possible problems ahead

Postby Radvan » 2011-08-17 05:35

Yes, I did install Lenny (and Squeeze) on a real machine. It wasn't a virtual machine. I post the fdisk output after returning from my work. Here I want to report a victory :P It is really possible to install Squeeze and OS/2 on the same computer! What I have found out:

(1) GRUB 2 is not the one who is causing troubles. It's FDISK but it is nothing new. Create a prtition with Debian FDISK, even in Lenny, and LVM will stop talking with you.

(2) I have noticed that Debian Squeeze FDISK numbers partitions from the end of the disk. At least, sometimes. In my last (successful) attempt, I have created 4 primary partitions for Debian using OS/2 LVM (I can afford it, I have 2 disks). The first one (from the beginning of the disk) was root, followed by /home, swap, and user defined FAT32 partition for passing files between eCS and Debian. Debian FDISK accepted these partitions without commentaries but - the root partition was (hd1,4). In Lenny, the partition would be (hd1,0). Oh, well, where the sad people which failed to install Sueeze along with other operating system installed their GRUB ... ?

(3) The whole installation runs without problems (if it does not crash in debootstrap or in "installing software"). I have installed on ext4, placing GRUB 2 (no GRUB legacy) on (hd1,4). After rebooting, the disk was okay for LVM, it was possible to add the Debian root partition to the boot manager menu and boot Squeeze. Terrific!
User avatar
Radvan
 
Posts: 108
Joined: 2009-06-22 09:38
Location: Prague, Czech Republic

Re: GRUB 2 - Possible problems ahead

Postby kiyop » 2011-08-17 21:50

I cannot understand why you installed debian again to solve mere problem with the boot loader.
I suggested you to run boot info script and post the result, but you have not posted the contents of the generated "RESULTS.txt". The "RESULTS.txt" involves the results of "fdisk -l" also.

Radvan wrote:(1) GRUB 2 is not the one who is causing troubles. It's FDISK but it is nothing new. Create a prtition with Debian FDISK, even in Lenny, and LVM will stop talking with you.

(2) I have noticed that Debian Squeeze FDISK numbers partitions from the end of the disk. At least, sometimes. In my last (successful) attempt, I have created 4 primary partitions for Debian using OS/2 LVM (I can afford it, I have 2 disks). The first one (from the beginning of the disk) was root, followed by /home, swap, and user defined FAT32 partition for passing files between eCS and Debian. Debian FDISK accepted these partitions without commentaries but - the root partition was (hd1,4). In Lenny, the partition would be (hd1,0). Oh, well, where the sad people which failed to install Sueeze along with other operating system installed their GRUB ... ?

(3) The whole installation runs without problems (if it does not crash in debootstrap or in "installing software"). I have installed on ext4, placing GRUB 2 (no GRUB legacy) on (hd1,4). After rebooting, the disk was okay for LVM, it was possible to add the Debian root partition to the boot manager menu and boot Squeeze. Terrific!

Grub legacy and grub4dos count the number of partitions from zero, while Grub 2 counts the number from 1.
I have never encountered such situation that fdisk numbers partitions from the end of the disk.
With fdisk, you can generate partition by "n" and number the partition to be generated.
With fdisk, the generated partitions are suggested to be numbered in the order of generation.
With fdisk, you can fix the partition order by "x" - "f".
If grub legacy is used, (hd1,4) is first logical partition in an extended partition.
I am confused and wait your posting the result of boot info script or fdisk -l.
The problem may be due to a bug of fdisk in Debian Squeeze Installer ISO (CD) for stressed LVM.
The problem may be due to strange partitioning behavior of OS/2 partitioner using LVM.
Openbox: Wheezy, Sid, Arch / Win XP (on VirtualBox) and 7
http://kiyoandkei.bbs.fc2.com/
User avatar
kiyop
 
Posts: 2296
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan

Re: GRUB 2 - Possible problems ahead

Postby bugsbunny » 2011-08-18 07:08

Documentation for grub2 is much improved over where it once was. The link for the current manual GNU GRUB Manual 1.99

Quoting from there: "Proprietary kernels (such as DOS, Windows NT, and OS/2) are supported via a chain-loading function."

If you want definitive answers I'd suggest posting to the grub list. If you do go that route please post back here with anything you find out. Grub list information is here: GNU GRUB - GRUB Mailing Lists You probably want the help list "help-grub is a list for getting help for GRUB. Subscription to the list is not required to post a question."

I'd be wary of a lot of the information you're likely to find on the Net as far as Grub2 goes. It's been undergoing heavy development (which seems to have slowed down of late, based on my upgrade frequency) and much of what you'll find is probably outdated. At least some of the Debian Grub developers are heavily involved in the actual development of grub so they're on top of things.

Since grub is a standalone package and doesn't use any of the linux libs I'd very strongly consider pulling the version from wheezy rather than using the version in squeeze. As I mentioned there's been a lot of work done on it and I suspect that many problems in the squeeze version have been fixed. Plus the manual I referenced is geared to the newer version. And any help you get from the grub list will also expect you to be using the newest version.
squeeze = 1.98+20100804-14
wheezy, sid = 1.99-11
Normally I don't recommend pulling packages from testing/unstable if you're running stable (in fact I strongly discourage the practice). I'd make an exception in this case.
User avatar
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

Re: GRUB 2 - Possible problems ahead

Postby Radvan » 2011-08-18 14:42

First, the FDISK listings. The OS/2 LVM (lvmgui.exe)

Code: Select all
Disk 1

C    2055    HPFS               primary    Bootable "eCS"
           7    Boot Manager    primary    Startable
D  32002    JFS                  logical      Advanced/LVM
E  32002    JFS                  logical      Advanced/LVM
F  31319    JFS                  logical      Advanced/LVM

Disk 2

    20002    Linux                primary     Bootable "root"
    65005    Linux                primary
      5004    Linux Swap       primary
      5361    FAT32              primary


This way the partitions were created using OS/2 LVM. Now, fdisk -l > zzz.txt. File zzz.txt:

Code: Select all
Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         262     2104483+   7  HPFS/NTFS
/dev/sda2   *         263         263        8032+   a  OS/2 Boot Manager
/dev/sda3             264       12161    95570685    f  W95 Ext'd (LBA)
/dev/sda5   *         264        4343    32772568+  35  Unknown
/dev/sda6   *        4344        8168    30724281   35  Unknown
/dev/sda7   *        8169       12161    32073741   35  Unknown

Disk /dev/sdb: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d5a01

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1           11476       12161     5510295    b  W95 FAT32
/dev/sdb2           10838       11475     5124735   82  Linux swap / Solaris
/dev/sdb3            2551       10837    66565327+  83  Linux
/dev/sdb4               1        2550    20482843+  83  Linux

Partition table entries are not in disk order


The partitions on /dev/sdb are in the opposite order for some reason. root is dev/sdb4. The ordering of partitions on dev/sda is okay.

I have noticed this during installation and installed GRUB 2 on /dev/sdb4. I haven't installed GRUB legacy at all. Accepted by the installer, no commentaries, it works.

Why I installed again? The first attempts to install Squeeze crashed. First in "installing software", then in "installing base system". I reinstalled Lenny. This passed. Then I tried to install Squeeze again but with primary partitions on disk 2 and with KDE. This passed, too. I did not reinstall or install because of GRUB, i wanted Squeeze. Now, I will try to return to Gnome.

To bugsbunny: Thanks :) I am glad that OS/2 can be found by GRUB finally. Saving this good news in my head. At present, I am able to "boot" GRUB 2 using OS/2 boot manager. Later on, I will try to pass only with GRUB 2 for sure.
User avatar
Radvan
 
Posts: 108
Joined: 2009-06-22 09:38
Location: Prague, Czech Republic

Re: GRUB 2 - Possible problems ahead

Postby kiyop » 2011-08-18 21:51

Thanks for your posting interesting report.

As for reinstalling, I understand your situation.

OS/2's fdisk and Debian Squeeze system (fdisk) may be incompatible (maybe bad terminology, I guess) for numbering the partition, which is the cause of the crash in installer of Debian Squeeze.

I forget whether you tried to install Debian Squeeze after preparing partitions in /dev/sdb by fdisk in booting Debian Squeeze installer(live) CD or not.
Radvan wrote:(1) GRUB 2 is not the one who is causing troubles. It's FDISK but it is nothing new. Create a prtition with Debian FDISK, even in Lenny, and LVM will stop talking with you.

You can execute fdisk after removing /dev/sda (OS/2 HDD) physically. Then it does not harm LVM of OS/2.

Edit: As you know, you need not modify your system because now you have working Debian and OS/2 and there is no problem.
Openbox: Wheezy, Sid, Arch / Win XP (on VirtualBox) and 7
http://kiyoandkei.bbs.fc2.com/
User avatar
kiyop
 
Posts: 2296
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan

Re: GRUB 2 - Possible problems ahead

Postby Radvan » 2011-08-20 04:32

I haven't manipulated partitions from Debian. I only assigned partitions (created in OS/2) to root, /home, etc. and formatted them. Creating partitions in Debian while having OS/2 on the same computer = asking for troubles. But this is nothing shameful for Debian or OS/2. When you have more operating systems on the same computer then you should manipulate your HDs from only one of them. When I started using Linux (Ubuntu, then Debian), I tried to create partitions from Ubuntu (Debian) installer. I got "disk corrupted, partitions do not start on cylinder boundary, partition size is wrong, and so on, go away".
User avatar
Radvan
 
Posts: 108
Joined: 2009-06-22 09:38
Location: Prague, Czech Republic

Re: GRUB 2 - Possible problems ahead

Postby dickr » 2012-02-17 12:00

More than 10 years ago I installed my 1st linux (slackware 2 floppy's) on my 486 computer configured in multiboot warp3 + windows95. I got slackware running but my OS/2 died in the process. The extended atrribs on my fat16 partition got corrupted. It was my 1st computer....

Now those times are back?!?

I came across this thread because I am working on computer and I want to install debian, pcbsd and OS/2 on it. I installed debian (6.0.4) and pcbsd. Then I 1st found out about "the 2nd generation of grub" (where is my menu.lst?). Solved that and now bsd boots as well. Luckely I found this thread before I started to install OS/2 because it is not going to work if I understand it correctly.

I wonder: what if I change the sequence? So:
1st install pcbsd including the BSD boot manager
2nd install debian. Will debian see the BSD boot manager and decide NOT to install grub2? Can the BSD boot manager boot debian for me?
3rd install OS/2 and let the BSD boot manager do that job as well.

Before I start cleaning the partitions, can someone tell me if my plan might work?
I code object-dis-oriented
dickr
 
Posts: 18
Joined: 2004-10-06 12:07
Location: Zoetermeer, The Netherlands

Re: GRUB 2 - Possible problems ahead

Postby jheaton5 » 2012-02-17 16:16

I've never installed OS/2 or PCBSD. I have set up many a triple boot with Windows, Ubuntu and Debian. In those cases it is necessary to install Windows 1st. After that the last linux distribution should be where you want your grub.cfg to reside. There will be a grub set up in the first linux distribution but when you install the second linux distribution it will override the previous grub set up. This method assumes you do not want to chainload from a master grub menu. You can search the site for discussions on chainloading.
debian sid with kernel img 3.8.10 lxde no dm
User avatar
jheaton5
 
Posts: 1475
Joined: 2008-08-20 01:40
Location: Sharpsburg, GA, USA

Re: GRUB 2 - Possible problems ahead

Postby dasein » 2012-02-17 16:55

dickr wrote:Luckely I found this thread before I started to install OS/2 because it is not going to work if I understand it correctly.

I encourage you to read the thread more closely. Even the OP, who made the problem 10 times harder than it had to be, said (quoting verbatim here)
Radvan wrote:Here I want to report a victory :P It is really possible to install Squeeze and OS/2 on the same computer!


dickr wrote:Before I start cleaning the partitions, can someone tell me if my plan might work?

One of the crucial mistakes made by the OP was in listening to folks (over in the Ubuntu forums) who simply didn't know what they were talking about. Rather than relying on the testimony of folks whose expertise you cannot verify, I'd encourage you to experiment for yourself, by following a suggestion I made to the OP: try it all out in a VM before applying it to "bare metal."
The most commonly asked questions are the least frequently researched questions.

How to get help with a technical problem
Debian Wiki | Debian FAQ | Debian Installation Guide | Debian Reference
User avatar
dasein
 
Posts: 5210
Joined: 2011-03-04 01:06
Location: Outskirts of Emerald City

Previous

Return to Installation

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable