LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Partitioning Question (https://www.linuxquestions.org/questions/slackware-14/partitioning-question-4175500680/)

Quicken2k 04-05-2014 10:34 AM

Partitioning Question
 
My Partition setup is as follows

/dev/sda1 (Recovery partition by Gateway)
/dev/sda2 (Windows 100mb partition)
/dev/sda3 (Windows C)
/dev/sda4 (NTFS Drive)
/dev/sda5 (EXTENDED PARTITION)
/dev/sda6 (Linux /boot)
/dev/sda7 (Linux /)
/dev/sda8 (Linux /home)
/dev/sda9 (Linux Swap)

I want to use sda6-9 for Slackware. However the installer won't prompt for a /boot or /home partition. How do I set them?. I also want to dualboot with win7 is this possible?

willysr 04-05-2014 10:46 AM

you will have a chance during installation phases to select partition (usually after you set your swap partition)

Yes, dual boot is VERY possible. I have a dual boot situation as well

Didier Spaier 04-05-2014 11:45 AM

Yes, after having set up your swap partition, the installer will find all your Linux partitions and ask you which one you want to use as root (/), then let you tell it which other ones you want to mount at boot time and on what mount point, that it will create as need be.

Then it will probe your FAT and NTFS partitions and will ask you the same question for each of them.

For each partition you will decide to use it will ask you if you want to format it.

It will then populate your /etc/fstab accordingly.

To know more, just choose HELP in the main menu.

PS It seems that after 5 years you decided to give Slackware a go. Welcome on board the Slackers Club!

hitest 04-05-2014 11:59 AM

Welcome to the official Slackware forum! :)

Paulo2 04-05-2014 12:26 PM

I think if you have MBR on this hd, you can have only four primary partitions,
or three primary partitions and one extended. Inside that extended partition,
you can create as many logical partitions you want.
(Sorry if I misunderstood the problem)

Quicken2k 04-05-2014 12:36 PM

Got it. How do I install grub2 and os-prober to detect my win7. Do these have to be done after initial install?

Didier Spaier 04-05-2014 01:33 PM

Quote:

Originally Posted by Quicken2k (Post 5147187)
Got it. How do I install grub2 and os-prober to detect my win7. Do these have to be done after initial install?

No need for that. The installer will ask you if you want to install lilo, just say yes. Then the installer will launch a script called "liloconfig" that will assist you in configuring and installing lilo. Lilo is perfectly able to dual boot Linux and Windows 7, that's what I use.

Quicken2k 04-05-2014 03:51 PM

I duplicated my partition setup in a virtual box. Installed Win7 (No Activation). Made two other ntfs partitions then installed slackware in the space left both work site by side in vbox. I will install it for real after a full backup of what I need

Quicken2k 04-05-2014 08:36 PM

Ok finally got Slackware installed on my physical PC. Everything goes fine even setup my NTFS partitions. When I get to installing lilo then comes the problem lilo doesn't install in the mbr right it suggested I install it manually, I have no idea how. Is it on the DVD?. It also complains about the video mode (I set to 1024x768x256.

Didier Spaier 04-06-2014 02:15 AM

Justboot off the DVD, start your system from there as indicated in the greeting screen and do what it says:
Code:

In a pinch, you can boot your system from here with a command like:

boot: hugesmp.s root=/dev/sda1 rdinit= ro

In the example above, /dev/sda1 is the / Linux partition.

Of course adapt to your disk's layout e.g. type /dev/sda7 instead of /dev/sda1 if / is /dev/sda7.

In your installed system then either type "liloconfig" as root, or edit manually /etc/lilo.conf as needed, then run "lilo -t -v" to check then if all goes well "lilo".

The lilo program is of course already installed in your Slackware, as it is in the installer.

ReaperX7 04-06-2014 03:40 AM

OS-Prober and grub2 are included with 14.1, and setup is virtually painless on MBR BIOS systems.

Code:

mkdir -pv /boot/grub
grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda

I currently use this setup:
Ext4 - 100MB - /boot
JFS - 250GB - /(root)
Swap - 8GB for expanded swap for compiling large packages that consume high amounts of RAM. Normally I've used 4GB.

and then simply symlinked my Windows user directories with my GNU/Linux user directories on my NTFS partition.

Richard Cranium 04-06-2014 04:52 AM

You may want to add the following as /etc/grub.d/09_slackware_linux with the executable bit set before you run grub-mkconfig:
Code:

#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"

. "${datarootdir}/grub/grub-mkconfig_lib"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

CLASS="--class gnu-linux --class gnu --class os"

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
  CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') ${CLASS}"
fi

# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
  /dev/loop/*|/dev/loop[0-9])
    GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
  ;;
esac

if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

linux_entry ()
{
  os="$1"
  tag="$2"
  version="$3"
  recovery="$4"
  args="$5"
  if ${recovery} ; then
    title="$(gettext "%s, with Linux %s [%s] (recovery mode)")"
  else
    title="$(gettext "%s, with Linux %s [%s]")"
  fi
  printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}" "${tag}"
  save_default_entry | sed -e "s/^/\t/"

  # Use ELILO's generic "efifb" when it's known to be available.
  # FIXME: We need an interface to select vesafb in case efifb can't be used.
  if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
      if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
          && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
          cat << EOF
        set gfxpayload=keep
EOF
      fi
  else
          cat << EOF
        set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
  fi

  if [ -z "${prepare_boot_cache}" ]; then
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
  fi
  printf '%s\n' "${prepare_boot_cache}"
  cat << EOF
        echo        $(printf "$(gettext "Loading Linux %s ...")" ${version})
        linux        ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
  if test -n "${initrd}" ; then
    cat << EOF
        echo        $(gettext "Loading initial ramdisk ...")
        initrd        ${rel_dirname}/${initrd}
EOF
  fi
  cat << EOF
}
EOF
}


process_list ()
{
    mylist="$1"
    tag="$2"
    initrd_allowed="$3"
    while [ "x$mylist" != "x" ] ; do
        linux=`version_find_latest $mylist`
        echo "Found linux image: $linux" >&2
        basename=`basename $linux`
        dirname=`dirname $linux`
        rel_dirname=`make_system_path_relative_to_its_root $dirname`
        version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
        alt_version=`echo $version | sed -e "s,\.old$,,g"`
        linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
        initrd=
        if [ "x${initrd_allowed}" = "xtrue" ]; then
            for i in "initrd-${version}.gz" "initrd.gz" \
                "initrd.img-${version}" "initrd-${version}.img" \
                "initrd-${version}" "initrd.img-${alt_version}" \
                "initrd-${alt_version}.img" "initrd-${alt_version}"; do
                if test -e "${dirname}/${i}" ; then
                    initrd="$i"
                    break
                fi
            done
            if test -n "${initrd}" ; then
                echo "Found initrd image: ${dirname}/${initrd}" >&2
            else
                # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
                linux_root_device_thisversion=${GRUB_DEVICE}
            fi
        else
            # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
            linux_root_device_thisversion=${GRUB_DEVICE}
        fi

        linux_entry "${OS}" "${tag}" "${version}" false \
            "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
        if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
            linux_entry "${OS}" "${tag}" "${version}" true \
                "single ${GRUB_CMDLINE_LINUX}"
        fi

        mylist=`echo $mylist | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
    done
}

prepare_boot_cache=

list=`for i in /boot/vmlinu[xz]-generic-* /vmlinu[xz]-generic-* ; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`

process_list "${list}" "generic" "true"

list=`for i in /boot/vmlinu[xz]-huge-* /vmlinu[xz]-huge-* ; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`
process_list "${list}" "huge" "false"

That's a total rip-off of the 10_linux script that attempts to prefer generic kernels with initrds over the other choices. You should run just grub-mkconfig to see what it does prior to overwriting your grub config file.

I use it myself, but I'm just a dog on the internet. :)

onebuck 04-06-2014 07:55 AM

Member Response
 
Hi,

Quote:

Originally Posted by Paulo2 (Post 5147183)
I think if you have MBR on this hd, you can have only four primary partitions,
or three primary partitions and one logical. Inside that logical partition,
you can create as many partitions you want.
(Sorry if I misunderstood the problem)

To clarify this a bit. You can have 4 primary partitions or 3 primary partitions with the fourth being a extended partition that you can create logical partitions within.

Look at:Linux File System;Partitioning with fdisk;
Quote:

5. Partitioning with fdisk This section shows you how to actually partition your hard drive with the fdisk utility. Linux allows only 4 primary partitions. You can have a much larger number of logical partitions by sub-dividing one of the primary partitions. Only one of the primary partitions can be sub-divided.
Examples:
  1. Four primary partitions (see Section 5.2)
  2. Mixed primary and logical partitions (see Section 5.3)

Hope this helps.

Quicken2k 04-06-2014 10:20 AM

It's now installed and running using the GRUB bootloader. Everything worked out of the box (even my RALINK wireless) which surprised me. I haven't tried videos or flash yet. I'm still building chromium from a slackbuild (been about 30min) now. Are slackbuilds always this slow?

Quicken2k
Mark

Paulo2 04-06-2014 04:36 PM

Quote:

Originally Posted by onebuck (Post 5147567)
Hi,
To clarify this a bit. You can have 4 primary partitions or 3 primary partitions with the fourth being a extended partition that you can create logical partitions within.

Thanks for the correction onebuck, you're absolutely right.


All times are GMT -5. The time now is 12:16 PM.