Siduction Forum

Siduction Forum => Installation - Support => Topic started by: JustDebian on 2013/04/04, 04:02:05

Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: JustDebian on 2013/04/04, 04:02:05
After weeks of playing with the Siduction Razor-Qt live cd, I decided to install Siduction on my HP Dv7-4170us laptop.

All seemed to go pretty well until installing Grub.

The only options in the installer were to put Grub in the MBR or in the /root partition. So I opted not to install Grub thinking I could put it into the partition of choice later by some other method.

After spending hours going through the Siduction forums (even translating some posts on similar problems and the wiki articles on chroot and fixing Grub2 from German to English), using the Debian wiki, and Google-ing, I have yet to find a way to boot Siduction.

I use another boot loader for booting multiple OSes and want to put Grub into the third primary partition (/dev/sda4 - yes, that is what it is). I have used sux in the terminal from the Siduction live cd to try the various methods that I read about - with no luck.

At one point, I had the Grub terminal active but I could not figure out how to make use of it. Now, "GRUB" appears at the top left corner of the screen and the cursor just blinks. Fortunately, my boot loader is still working and my other OSes still boot normally.

dpkg-reconfigure grub-pc only offers the MBR or /, even though I mounted /dev/sda4 to /boot (the desired partition).

I am exhausted, confused, and frustrated at this point and would appreciate some clear guidance for setting up Grub to boot Siduction from my partition of choice.
Title: How To Install Grub In Partition Of Choice (not / or MBR)
Post by: Bequimão on 2013/04/04, 07:59:13
root@ebox:~# grub-install --force /dev/sdb2
   /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
   /usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
   Installation finished. No error reported.


Hi JustDebian,

Welcome to the siduction community! You may install grub to partition with the parameter --force. I do, however, use another installation with grub2 for boot. So it doesn't matter, if grub is installed to partition or not.

Best regards,
Bequimão
Title: How To Install Grub In Partition Of Choice (not / or MBR)
Post by: der_bud on 2013/04/04, 08:53:43
Hi JustDebian, it's too bad that the installer did not offer you the options you wanted, probably you have seen from the several posts you have read that this sometimes happens under certain circumstances (should not, though).

To fix your grub i see two possible ways. The first is: you wrote about "another boot loader for booting multiple OSes". Is this loader somehow able to recognize siduction as bootable OS (the kernel image) without needing siduction grub in its partition? If your other bootloader is i.e grub from another distribution, booting that OS and executing "os-prober" and "update-grub" should find siduction.

The second way for (re)setting up grub to boot an already installed siduction is chrooting into the installed system from a live-medium. The steps are described in the manual:  System Administration - Grub2 - Recovering Grub with chroot (http://manual.siduction.org/en/sys-admin-grub2-en.htm#chroot)
Please pay attention, I am not sure if the given command with --reinstall will write perhaps to mbr without prompting. In the chapter above (Bootsector overwritten by Windows) is the command to rewrite installed grub to /dev/sda, should be useable if you enter /dev/sda4 instead.
Title: RE: How To Install Grub In Partition Of Choice (not / or MBR
Post by: Gabriel_M on 2013/04/04, 16:23:56
The Grub necessarily must be installed in to / or /boot of Siduction.

Installed in to / or /boot of Sidution, must be recognized by your other boot loader.
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: dieres on 2013/04/04, 17:48:49
If your siduction is installed in /dev/sda4 you may follow the steps in the link der_bud gave you to do the chroot Process.
Chande /dev/sda2 to your /dev/sda4. If you are in Chroot you should be able to install Grub with:
grub-install --force /dev/sda4.

After this your primary boot-loader must be configured to start grub in /dev/sda4.


What is your boot-loader?
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: Bequimão on 2013/04/04, 18:22:07
Another hint: don't use the command # sux.
It is broken and not recovered until now
http://forum.siduction.org/index.php?topic=1976
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: devil on 2013/04/04, 18:35:19
a substitute for sux is suxterm. Get used to it, noone knows if sux will ever be fixed.

greetz
devil
Title: Re: How To Install Grub In Partition Of Choice (not / or MBR
Post by: JustDebian on 2013/04/05, 00:53:46
Quote from: "Bequimão"root@ebox:~# grub-install --force /dev/sdb2
   /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
   /usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
   Installation finished. No error reported.


Hi JustDebian,

Welcome to the siduction community! You may install grub to partition with the parameter --force. I do, however, use another installation with grub2 for boot. So it doesn't matter, if grub is installed to partition or not.

Best regards,
Bequimão

Thank you for the welcome, Bequimão!

Yes, that is the message that was shown. The same thing happened when I installed Debian Wheezy. I ended up having to use GRUB from Squeeze. Since Kernel 3.2.x from Squeeze-backports and Wheezy had hardware errors, I sought other Debian-based distros. So far, Siduction has worked fine from the live-cd.

I did use the --force parameter, which caused the GRUB files to be installed where I wanted them. There was an error that I do not recall at the end of the process (silly me was hoping that it would somehow "fix" itself).

Unfortunately, the boot manager that I use cannot boot linux directly - I never expected to need that function until GRUB started having issues.

Thank you for the welcome and your insights into this.
Title: Re: How To Install Grub In Partition Of Choice (not / or MBR
Post by: JustDebian on 2013/04/05, 01:03:47
Quote from: "der_bud"Hi JustDebian, it's too bad that the installer did not offer you the options you wanted, probably you have seen from the several posts you have read that this sometimes happens under certain circumstances (should not, though).

I was used to the Debian Installer offering free choice of GRUB location. Wheezy, however, would not install GRUB, either.

QuoteTo fix your grub i see two possible ways. The first is: you wrote about "another boot loader for booting multiple OSes". Is this loader somehow able to recognize siduction as bootable OS (the kernel image) without needing siduction grub in its partition? If your other bootloader is i.e grub from another distribution, booting that OS and executing "os-prober" and "update-grub" should find siduction.

The boot loader that I use cannot boot linux.

QuoteThe second way for (re)setting up grub to boot an already installed siduction is chrooting into the installed system from a live-medium. The steps are described in the manual:  System Administration - Grub2 - Recovering Grub with chroot (http://manual.siduction.org/en/sys-admin-grub2-en.htm#chroot)
Please pay attention, I am not sure if the given command with --reinstall will write perhaps to mbr without prompting. In the chapter above (Bootsector overwritten by Windows) is the command to rewrite installed grub to /dev/sda, should be useable if you enter /dev/sda4 instead.

I will study that more carefully and see if I can successfully chroot this time.

Thank you for your input.

ADDITION April 6, 2013:

Following the chroot instrucitons, I was able to chroot numerous times trying to get a good install. Good practice.  :)
Title: Re: How To Install Grub In Partition Of Choice (not / or MBR
Post by: michaa7 on 2013/04/05, 01:29:57
EDIT://
i was wrong
Title: Re: RE: How To Install Grub In Partition Of Choice (not / or
Post by: JustDebian on 2013/04/05, 01:39:22
Quote from: "Gabriel_M"The Grub necessarily must be installed in to / or /boot of Siduction.

Installed in to / or /boot of Sidution, must be recognized by your other boot loader.

Revised April 6, 2013:

Having used the Debian Installer for each stable release since Sarge, I was used to having to specify the location for LILO/GRUB. With Siduction, that is not necessary.

I use the third primary hd partition for /boot with / having its own separate partition in the extended region. This is because LILO had required being installed in a bootable partition - GRUB has been OK with this arrangement too.

I had read, years ago, and still see the recommendation to put GRUB (or LILO) in a separate ext2 partition because the boot loader is static and journaling was unnecessary and/or could slow down hard drive response. The / partition could then be put anywhere else on the hard drive, even an extended partition, using an ext3 or ext4 file system.

With Siduction, that approach caused some problems. Also, I was not understanding clearly what the installer was doing.

PROBLEM ONE:

/usr/sbin/grub-bios-setup: Warning: File system 'ext2' doesn't support embedding. I am not quite sure what this means or if it only happens when / is installed in an ext4 partition (I have not used ext4 before and I never saw it when using ext3 with native Debian). I only used ext4 because it was recommended in the Siduction manual, even though I felt more comfortable with ext3 (I am trying to move forward with the technology).


PROBLEM TWO (ME):

The bigger problem was me not understanding the Siduction installer:

After confirming the partition layout, the installer asks to select the partition and file system type for the root file system. That is pretty straight forward. Again, I selected ext4 over ext3 because it was highly recommended in the manual.

Mount Point Definitions is where I got myself into trouble. Besides using a separate partition for /home, I used a separate primary partition for /boot. Because of my previous experience with the Debian Installer, I thought that I would later have to specify the device (i.e. /dev/sda4) where GRUB was to be installed.

What I finally figured out was that because the /boot partition (/dev/sda4, in this case) would be integrated into the / file tree, when it was time to choose the location for GRUB, in the next step, *Partition* was the correct choice. The Siduction installer would know to install GRUB into /boot (a.k.a. /dev/sda4) without any further instructions.

My preferred boot loader (Plop) is not a Linux loader but can recognize and chain load GRUB/LILO.

Had I understood this better for myself, I may have had a working Siduction system by now. Since I tend to learn the hard way (trial and lots of errors), I suppose the multiple chroot exercises and numerous re-installs are all part of the learning process.
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: JustDebian on 2013/04/05, 01:51:01
Quote from: "dieres"If your siduction is installed in /dev/sda4 you may follow the steps in the link der_bud gave you to do the chroot Process.
Change /dev/sda2 to your /dev/sda4. If you are in Chroot you should be able to install Grub with:
grub-install --force /dev/sda4.

Revised April 6, 2013:

Using --force is not necessary. As it turned out, I was not understanding how the installer worked. My impression was that it would install GRUB into / and not /boot if I selected the *Partition* option. After I figured out what the installer was doing and set the mount point partitions correctly, GRUB installed as it should.

QuoteAfter this your primary boot-loader must be configured to start grub in /dev/sda4.

Yes, it already is. I had Debian Squeeze installed exactly as I am I trying to install Siduction. I just need to get GRUB to complete installation.

QuoteWhat is your boot-loader?

I am using Plop Boot Manager. It is simple enough for me to use but has some powerful features for someone who has the knowledge to use them. The author does make it clear, though:
QuoteWarning Linux users: Install LILO or GRUB to the boot sector of your Linux instead of the Master Boot Record (MBR). The Plop Boot Manager is not a Linux loader and cannot start Linux without LILO, GRUB, Syslinux and similar!

Thank you for your guidance.
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: JustDebian on 2013/04/05, 01:52:44
Quote from: BequimãoAnother hint: don't use the command # sux.
It is broken and not recovered until now
http://forum.siduction.org/index.php?topic=1976

Good to know. Thank you.
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: JustDebian on 2013/04/05, 01:56:10
Quote from: "devil"a substitute for sux is suxterm. Get used to it, noone knows if sux will ever be fixed.

greetz
devil

Thanks, devil. I tried suxterm from the live-cd but could not remember the root password. Old brains die fast. I will try it again after I re-read that part of the manual.

Update: April 6, 2013:

After re-reading how to set the live-cd root password (sudo passwd), suxterm worked nicely. Thanks, again, for that tip.  :)
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: Gabriel_M on 2013/04/05, 02:09:19
To install Plop Boot Manager on a hard drive within a Grub2 distro takes a bit longer.

The Plop file that is used for hard drive installation is plpbt.bin, which must be placed in the /boot directory:

Then go to /etc/grub.d and open the 40_custom file with nano.

There is a sample file there that begins with #!/bin/sh and is followed by several lines of comments and instructions.
Below those instructions, add the following:

menuentry "Plop Boot Manager" {
  set root=(hd0,1)
  linux16 /boot/plpbt.bin
}


Then save the file and close nano.
This will establish a new 40_custom file as the final item in the boot menu for the distribution in which you were working.
To activate it, update the grub:

# update-grub

and reboot.

If your computer is multibooted, Plop Boot Manager will appear as the final boot option.
If you are running only one distro, depress the Shift key during boot to see the options.
Title: Re: How To Install Grub In Partition Of Choice (not / or MBR
Post by: JustDebian on 2013/04/05, 02:12:19
Quote from: "michaa7"EDIT://
i was wrong

Hi michaa7:

You were not completely wrong. Before I knew about linux partitioners, I used Partition Commander. For some reason, it considers the extended partition as sda3 (actually sda3 does not appear anywhere). Since the hard disk works and the multiple OSes work and the boot manager (Plop) works, I just don't want to monkey with it and risk losing everything.

Since I want to install GRUB in its own partition (/dev/sda4) as I had done with Squeeze and Wheezy, I am guessing that the GRUB installer is having issues. If I were to install GRUB in the / partition with the rest of Siduction, it is likely to work fine. If I can, I would like to get it to work my way, though.

Thanks for chiming in.
Title: Re: How To Install Grub In Partition Of Choice (not / or MBR
Post by: michaa7 on 2013/04/05, 02:27:24
Quote from: "JustDebian"...
You were not completely wrong...

Nice you took it that way, but I was completely wrong about your skills ;-)
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: JustDebian on 2013/04/05, 02:31:12
Quote from: "Gabriel_M"To install Plop Boot Manager on a hard drive within a Grub2 distro takes a bit longer.

I will see if I need to do this after I try chroot to get GRUB installed completely. (Added April 6, 2013: I use Plop to load GRUB. If I understood the code, that set up would use GRUB to load Plop).

Plop Boot Manager is already installed on the hard drive MBR and has been working fine for two years to boot DOS, Win7, Squeeze, and Wheezy. I replaced Squeeze with Wheezy in an attempt to fix some hardware issues - it did not.

Now I replaced Wheezy with Siduction because it worked nicely and without hardware errors (so far). I just need to get a working GRUB in /dev/sda4 as with Squeeze and Wheezy so Plop has something to load. (Added April 6, 2013: after much trial and error, I figured out better how GRUB is installed by the installer).

I could install GRUB from Squeeze (as I had to do for Wheezy) but I was concerned that updating Siduction would trash something. (Update April 6, 2013: Actually GRUB from Squeeze will not work because of incompatible dependencies - I tried it). I will try to correctly do the chroot method and hope that solves the whole matter. (Added April 6, 2013: I used chroot several times but it turns out it was unnecessary because I was not using the installer correctly - I took something simple and tried to make it complicated. :oops:

I am old with brain glitches, have no formal computer/programming education, and am still fairly new to linux. So, please be patient as learn this stuff one step at a time.

I appreciate your assistance.
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: Geier0815 on 2013/04/05, 15:57:07
Ok, it's not the recommended way but did you try to install grub-legacy? This should be the old grub-version grub1. With this you shouldn't have these problems...
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: JustDebian on 2013/04/06, 13:16:26
Quote from: "Geier0815"Ok, it's not the recommended way but did you try to install grub-legacy? This should be the old grub-version grub1. With this you shouldn't have these problems...

Out of desperation I did finally try this. The error The file stage1 not read correctly appeared. However, I was not understanding how the Siduction installer works at the time. Pursuing this approach any further is not necessary.

It was certainly a good idea, though.  :)
Title: [SOLVED] Install Grub In Partition Of Choice (not / or MBR)
Post by: piper on 2013/04/06, 14:23:28
IMHO, I would trash Plop, It's not needed.

I boot siduction, aptosid, snowlinix, solaris, windows 7, and then my test builds (fromiso) of aptosid (all flavors) and siduction (all flavors)

Sooner or later, things are going to break

But, then again, Choice is Good. :)
Title: Still Not Getting A Bootable Siduction Install
Post by: JustDebian on 2013/04/06, 22:00:32
After I stopped trying to complicate what the maintainers worked so hard at simplifying, I tried a complete reinstall (several actually) from scratch.

I used Gparted from within the live-cd to:
 
I restarted the computer and live-cd then when through all of the preparation and update steps (AFAIK).

Then I did a clean install without monkeying with anything. GRUB still would not start.

I then reinstalled Squeeze on the same partitions (reformatted them as ext4) and in the exact same way as I have been trying to do with Siduction. Squeeze booted right up without any problem.

Without changing anything, I reinstalled Siduction in those same partitions (after the preparation and updates). The Siduction installer reformatted the / partition but apparently not the others (which is what I wanted).

The install was reported as successful. The log at the bottom showed GRUB installed in /dev/sda18 (which is the root partition). Even though /dev/sda4 was mounted as /boot, the installer only offers to install GRUB in the MBR or / partition.

When I rebooted the computer, all I got was 'GRUB' with a blinking cursor at the top left of the screen. Apparently there is some problem with using a separate /boot partition for GRUB.

Since all releases of Debian have worked fine with my partition arrangement since Sarge, I am certain there is way to fix this issue. Unfortunately, I do not have the knowledge to do that.

To the best of my knowledge, Siduction is installed fine - it just needs GRUB to work.
Title: Still Not Getting A Bootable Siduction Install
Post by: michaa7 on 2013/04/07, 02:34:49
I *assume* there was a difference between you siducion and your Squeeze install: The Debian installer let you define a /boot partition, the siduction install did not, right?

When you installed siduction dev/sda4 was mounted to /boot. So your install apparently went well. But when Grub starts, sda4 isn't mounted to /boot. So your PlobBM starts Grub on sda18, and Grub looks for whatever on /boot and will find nothing (as all files Grub is looking for aren't on the partition containing "/").

I think you have to edit the grub config file (because it does not point to sda4. But I still am not familiar enough with Grub2 to tell you which file to edit.
Title: Getting GRUB to Boot Siduction-RazorQt
Post by: JustDebian on 2013/04/07, 02:57:43
Installing Siduction-RazorQt from the 09 December 2012 live-cd with GRUB installed in a partition different from the / partition would not boot after restart.

Booting from the live-cd and following the chroot instructions multiple times to reinstall GRUB did not work.

Reformatting the partitions and doing multiple clean installs did not help.

After the last clean install, the use of SuperGrub2 v2.00 (http://www.supergrubdisk.org/super-grub2-disk/) found two grub.cfg files on the system - one in the /boot partition and one in the /boot directory under /. Selecting the grub.cfg in the /boot partition brought up the normal GRUB bootloader menu. From it, Siduction could finally be started.

From within installed Siduction, the instructions for doing a dist-upgrade were followed:
http://manual.siduction.org/en/sys-admin-apt-en.htm#apt-cache

After the dist-upgrade was complete, GRUB was reinstalled:
apt-get install --reinstall grub-pc
During configuration, a window popped up offering choices as to where to install GRUB. In this instance, the designated /boot partition was offered (it was not during previous installs).

After a restart, GRUB was seen by my Plop Boot Manager and started GRUB normally which, in turn, booted Siduction.

Possibly, had I done a dist-upgrade from the live-cd, all of the necessary packages and processes would have been available to do a clean and proper install the first time. With the ways and means of Siduction being different from what I had known, that option seemed counter intuitive. I thought that I saw a section in the manual about doing a live-cd dist-update but I could be wrong.