Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

  1. Follow us on twitter - we shoot all of our new original content out as well as random messages. https://twitter.com/linuxdotorg
    Dismiss Notice

Multiple partition Debian install from harddisk

Discussion in 'Debian and derivatives' started by brandn0007, May 25, 2013.

  1. brandn0007

    brandn0007 Guest

    Hi I had installed Debian to dual boot with windows on my laptop but accidentally deleted Debian (sudo rm /) lol. So I have failed to fix the problem and lost my 8gb usb drive. I had 5 or six partitions i believe. I would wish to use a completely free partition of 6gb to store the Debian installer. Then use the grub that boots to install the new Debian where the old one was.
    Note: the other partitions are my windows 7 and recovery partitions.

    (Log in to hide this advertisement)

    I would like to know:

    If this is viable, Which installation files to put on the free partition, and any special instruction as to installing the new Debian in place of the old one.

    Thank you for your help
    1 person likes this.
  2. pane-free

    pane-free Guest

    wtf? too unclear as to what you had, what happened, and what your hdd looks like now. :confused:

    what is the USB stick (you lost) to do with the question?
    Why did you have an extended partition on your hdd in the first place, and how many partitions are dedicated to windoze (should be one only)?

    suggest using gparted, doing a screenshot in jpg, make it 600X800 and posting it here; this would tell us what is there now.
    1 person likes this.
  3. brandn0007

    brandn0007 Guest

    So I was able to download the debian-netinst iso file, linux kernel and initrd. Then placed them on the free partition where i used grub to load the kernel and initrd then booted the iso to install and it worked. It turned out that 2 partitions were a part of an external hard-drive i had attached so in actuallity there were 4 partitions. a Linux, swap, windows, and free extended. In grub I used these cmds I found after researching for hours lol

    linux (hd0,msdos6)/linux
    initrd (hd0,msdos6)/initrd.gz
    boot (hd0,msdos6)/debian-7.0.0-amd64-netinst.iso

    I didn't originally have a wired connection so i was hoping to do this with the cd1 iso but that turned out to leave me with a version that had very little so i used the netinstall you see above.

    Now that i have debian working after a 24hrs of working on it my broadcom 4322ag adapter is giving me problems along with the network manager that wheezy has.

    PS i mentioned the lost usb because i had nothing external to boot from eg. usb , cd/dvd so i had to use the extended partition

    Thx for you interest I guess I figured this thread would be a faster solution than hours of research :/ but i know there are alot posts and not as many experts :)

    to clarify to any others (hd0,msdos6) is the free partition formated in fat32
  4. Kevin Milan

    Kevin Milan Guest

    To use LVM you need to take at least one partition, initialise it for use with LVM and then include it in a volume group. Why would you do this? Well it would let you create new partitions on the fly, and make better use of your space.
    In my case I have a laptop with the following setup:

     Name        Flags      Part Type  FS Type          [Label]        Size (MB)
        hda1        Boot        Primary  Linux ext3      [/]              8000.01
        hda2                    Primary  Linux swap / Solaris              1000.20
        hda3                    Primary  Linux                            31007.57

    Here I have a 7Gb root partition which contains my Debian GNU/Linux installation. I also have a 28Gb partition which will be used by LVM. I've chosen this setup so that I can create a dedicated /home partition using LVM - and if I need more space I can extend it.

    In this example hda1, hda2, and hda3 are all physical volumes. We'll initialize hda3 as a physical volume:

    [email protected]:~# pvcreate /dev/hda3
    If you wanted to combine several disks, or partitions you could do the same for those:

    [email protected]:~# pvcreate /dev/hdb
    [email protected]:~# pvcreate /dev/hdc
    Once we've initialised the partitions, or drives, we will create a volume group which is built up of them:

    [email protected]:~# vgcreate skx-vol /dev/hda3
    Here "skx-vol" is the name of the volume group. (If you wanted to create a single volume spanning two disks you'd run "vgcreate skx-vol /dev/hdb /dev/hdc".)

    If you've done this correctly you'll be able to see it included in the output of vgscan:

    [email protected]:~# vgscan
      Reading all physical volumes.  This may take a while...
      Found volume group "skx-vol" using metadata type lvm2
    Now that we have a volume group (called skx-vol) we can actually start using it.

    Working with logical volumes

    What we really want to do is create logical volumes which we can mount and actually use. In the future if we run out of space on this volume we can resize it to gain more storage. Depending on the filesystem you've chosen you can even do this on the fly!

    For test purposes we'll create a small volume with the name 'test':

    [email protected]:~# vgscan
      Reading all physical volumes.  This may take a while...
      Found volume group "skx-vol" using metadata type lvm2
    This command creates a volume of size 1Gb with the name test hosted on the LVM volume group skx-vol.

    The logical volume will now be accessible via /dev/skx-vol/test, and may be formatted and mounted just like any other partition:

    [email protected]:~# vgscan
      Reading all physical volumes.  This may take a while...
      Found volume group "skx-vol" using metadata type lvm2
    Cool, huh?

Share This Page