Announcement

Collapse
No announcement yet.

grub problems in chroot

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    grub problems in chroot

    Right, I'm in chroot and want to install grub

    I've tried
    Code:
    grub-install /
    with this result
    Code:
    Probing devices to guess BIOS drives. This may take a long time.
    Format of install_device not recognized.
    Cos I'm in chroot my /dev does not have the usual hdX/sdX stuff, i.e. I cannot simply do a
    Code:
    grub-install /dev/sdX
    I've been told to do a bind mount, haven't got the foggiest though as to what that means or how to go about it.

    If there is anybody out there who has an idea, please hit me with it!

    Thanks in advance
    Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

    #2
    Re: grub problems in chroot

    It didn't like the device specified by the / .
    Let me be real clear from the start: you are out there beyond me, my friend. In fact, I've managed to avoid the grub shell within Linux and do all my installs with the front-end setup command (reason: except for simple systems, the grub shell through device.map often gets the devices wrong, you must pay attention to where you issue the commands, and it's a hassle to mess with it).

    OK, so you are chroot-ing into a Linux grub shell ... I have no clue without experimenting myself what effect the commands will have. Also, never heard of a bind mount either (google?).

    I don't know your application, but keep in mind that original GRUB image files are kept (usually in Kubuntu) at /usr/lib/grub/i386-pc. I see 9 files, various stage 1, 1.5, and stage 2 and el torrito (CD) files in mine. You don't need them all of course, but, heck, just 300 kB, if you just drag them all out (from anywhere) and into a /boot/grub directory that you have or that you make (at any location), you are set to go with root (hdx,y) & setup (hdz) from a live CD.

    Post back with more if you feel like it; sounds interesting.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: grub problems in chroot

      Funny that it should be you replying (in fact, I hoped you would ).

      I'm in the process of remastering. Grub is one of the few obstinate things I simply appear not to be able to change.

      Here the background - take a debian based live cd, mount it into a directory, separately mount its squashfs, chroot into it and bingo, you are the master.

      I am dealing with grub-gfxboot so it is nice and pretty. But whatever I do with the "message" (you familiar with gfxboot? that is the bit with the enhanced background - otherwise it appears to be pretty much the same as grub legacy) it only works on a full install, never on the remastered live cd which obstinately holds on to the "original". I am damned if I can find it :P

      Here is my /usr/lib/grub/i386-pc:
      root@dicker:/usr/lib/grub/i386-pc# ls -l
      total 328
      -rw-r--r-- 1 root root 8576 2007-12-15 19:23 e2fs_stage1_5
      -rw-r--r-- 1 root root 8448 2007-12-15 19:23 fat_stage1_5
      -rw-r--r-- 1 root root 7680 2007-12-15 19:23 iso9660_stage1_5
      -rw-r--r-- 1 root root 9440 2007-12-15 19:23 jfs_stage1_5
      -rw-r--r-- 1 root root 7776 2007-12-15 19:23 minix_stage1_5
      -rw-r--r-- 1 root root 10560 2007-12-15 19:23 reiserfs_stage1_5
      -rw-r--r-- 1 root root 512 2007-12-15 19:23 stage1
      -rw-r--r-- 1 root root 121514 2007-12-15 19:23 stage2
      -rw-r--r-- 1 root root 121514 2007-12-15 19:23 stage2_eltorito
      -rw-r--r-- 1 root root 10184 2007-12-15 19:23 xfs_stage1_5
      root@dicker:/usr/lib/grub/i386-pc#
      Same as normal grub legacy, right? Thing is, where can I change GRUB's initial appearance?

      I thought a grub-install would do the trick but ran into probs there, hence this post. I then tried update-grub, but just booted my remastered iso in vbox and I _still_ get the original image

      Sorry if I'm rambling, but takes time to organise my thoughts... Anyway, I hope you can follow me and perhaps give me advice on grub on live cds or some such...
      Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

      Comment


        #4
        Re: grub problems in chroot

        “Funny that it should be you replying (in fact, I hoped you would ).”

        To that I say, Funny that you brought this subject up .
        I don't know much about it, and what little I've tried with remastering hasn't worked (yet). Never messed with GRUB that way either. I've done most stuff on flash drives, not CDs. But this is on my TODO list (live CDs) as I have another project in mind. What you are doing is interesting. If you post this to a mail list, like Super Grub Disk, or a GRUB forum, you'd no doubt get lots of excited responses (just endure the snide remarks about how much you don't know but should know and the usual prima donna stuff). Or, look at how Herman builds his CDs on his site and see if you can't get a clue from that (although I don't think he gets down to this level you are working at).
        http://users.bigpond.net.au/hermanzo...ub_DiskGParted

        Of course, I'll be thinking about this; post back with any further progress.
        Sorry I don't have anything concrete just now.

        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: grub problems in chroot

          Thank you for your help, Qqmike. I reckon I can cope with the snide remarks

          In case you are interested - I have written a couple of scripts - one takes the sting out of setting up the remastering environment and the other out of making the iso. The only thing you have to do is worry about what to do while in chroot

          Let me know if you're interested - I will obviously improve them with time although they are in perfect working order already.
          Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

          Comment


            #6
            Re: grub problems in chroot

            I think I'm remembering that adrian15 Super Grub Disk owner has worked with grub-gfxboot a lot; and he does make all those Live CDs (many of them, with multiple distros). It's easy to get on the SGD mail list, where you can post questions.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: grub problems in chroot

              ... and, of course, as you may have noticed, lots of the SGD list is on European time (the owner is in Spain, I believe), so allow for the lag (or give enough details in case there's an overnight cycle). (I just rec'd the post )
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Re: grub problems in chroot

                Spain? Sort of round the corner
                Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                Comment

                Working...
                X