Find the answer to your Linux question:
Results 1 to 9 of 9
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Boot/Root confusion!


    My brain is seriously tangled with all the boot partition/rootpartition business. For one thing, I'm trying to do a stage 3 install and I have come to the point of editing /etc/fstab. Now, apparently I'm supposed to have 2 primary partitions, one for the boot, and one for the root, although I don't recall having more than 1 non-swap partition for my previous distro (Mandrake 10.0). As a matter of fact, my only Linux partitions on the SATA HD are /dev/sda4 (main) and /dev/sda6 (swap); the rest belong to Windows XP Home and Professional. For now, I've temporarily interrupted my setup, because I'm not sure how to edit the fstab. I'm thinking my boot and root lie on the same partition, so the two lines would read something like this:
     /dev/sda4 *   /boot     ext3    noauto, noatime  1 2 
    /dev/sda4      /         ext3   default                0 1
    Is this correct, or do I run the risk of messing up my Linux setup?


  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    IIRC /etc/fstab deals with mounting devices on boot etc.

    since /boot is not an partition you souldn't have it in there just
    /dev/sda4      /         ext3   default                0 1
    correct me if I am wrong;

    Registered Linux User #371543!
    Get force-get May The Source Be With You

  3. #3
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    The DairyLand
    you can look at your partitions type cfdisk /dev/hda and that will show you your partitions then quit out of it after you write down the info

    if that dosnt work 'alt F2 or F3 to a non chroot'd virtual terminal then do the cfdiskthen alt F1 or whatever to get back to the chroot'd vt
    ~Mike ~~~ Forum Rules
    Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds

  4. $spacer_open
  5. #4
    The Gentoo Installation Handbook uses separate primary partitions for "boot" and "root". I cannot do that - can't uninstall Windows XP (don't want to ) - and I'm positive I didn't have 2 primaries for Mandrake 10.0. I was just editing the /etc/fstab file produced by the Gentoo installation process, and even the handbook has something mounted @ the mountpoint "/boot" (in this case, their "boot" partition). But if the boot and root partitions are the same for me, how do I avoid setting up the two in the fstab file without creating conflicts?

    P.S: I shall try your suggestion the next time I reboot, loft306. Thanks.

  6. #5
    Well, I tried running "cfdisk /dev/sda" and sure enough, I have only one primary partition reserved for Linux (the swap being separate of course). Only one of the partitions has a "Boot" flag next to it (in 'cfdisk'), and that is my default OS, WinXP Home Edition. I have done everything in the Gentoo Handbook stage3 install except setup the bootloader, and of course edit the /etc/fstab. So, I'm pretty much stuck here unless I can resolve the boot/root partition confusion. And to make matters worse, my current fstab setup has the boot partition line as an ext2, whereas the root showes the correct FS that I setup on the drive with the "mke2fs -j /dev/sda4" command: ext3.

    Please help!!!

  7. #6
    Linux Guru
    Join Date
    May 2004
    You do not want to have two lines in your fstab to mount the same /dev/. You will only mount / and since /boot exists (it better!) in that same partition, it will go along for the ride. Can you verify that your /boot directory holds the kernel and initrd? If so, then you should be able to boot. I'm not sure, but I think your grub.conf will look something like this (I'll check it a little later):
    root (hd0,x)/boot
    kernel /boot/vmlinuz...
    initrd /boot/....
    //got nothin'
    ///this use to look better

  8. #7
    Linux Guru
    Join Date
    May 2004
    I have a working gentoo install with a /boot partition (hda1) and a separate root (/) partition (hda2). Grub looks kind of like this:
    • root (hd0,0)
      kernel /kernel.... root=/dev/ram0 init=/linuxrc real_root=/dev/hda2 ramdisk=8196
      initrd /initrd....
    (this was transposed by hand, not responsible for all details....)

    I copied the contents of /boot/* into a new directory /fakeboot/ and I was then able to boot to it with the following changes to Grub:
    • root (hd0,1)
      kernel /fakeboot/kernel.... root=/dev/ram0 init=/linuxrc real_root=/dev/hda2 ramdisk=8196
      initrd /fakeboot/initrd....
    That entirely bypassed the /boot directory.

    Now what?

    //got nothin'
    ///this use to look better

  9. #8
    Linux Enthusiast
    Join Date
    Jun 2004
    Windsor, CO
    In linux, you can either have /boot as a separate partition or inside another partition. In this case, just follow the book's instructions but don't add the /boot line to /etc/fstab, and treat /boot like a folder, since that's what it will be.
    Emotions are the key to the soul.
    Registered Linux User #375050

  10. #9
    Sorry for the delay in replying. Have been sick the entire week, and as you all know, "bad cold + CRT monitor = human-rights violating torture"!

    Anyway, I got lilo and gentoo to boot properly without a fuss. I simply removed the line "/boot /dev/sda4 ..." and it booted fine (although for some reason, gentoo tends to boot in 640x480 mode, whereas I tried to use a 1024x768x16 framebuffer boot. Ah well, hafta get to the bottom of that now...)

    Thank you very much for all the replies!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts