LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-27-2014, 04:49 AM   #1
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 49
Installing Debian from hard disk with GRUB2 boot loader


Hello everyone.

1. I have an old hard disk which I used to store Windows files. So I think the disk is formatted to the Windows filesystem.
I want to install Debian onto this hard disk via the GRUB2 bootloader.

Firstly, can someone please advise if the hard disk needs to be re-formatted (to FAT32 for example)?

2. Also, I have a debian 7.7 amd64 netinst.iso image for the OS saved onto the hard disk. I am hoping that if I use GRUB2 boot loader, then it will use the iso image to install debian onto my hard drive.
Is this correct?

3. On the hard disk, I have also created a 'boot' folder. Inside the boot folder is: initrd.gz and vmlinuz.
Now I want to download GRUB2 and put it into the boot folder too.
Can someone please say where I can get GRUB2 from a reputable website?

4. Is this the correct way to install a linux OS from hard disk without burning a CD?

Any help would be appreciated!
 
Old 12-27-2014, 05:15 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,431

Rep: Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768
1. hard disk will be reformatted during install.
2. it is not correct, the installer image contains the bootloader too, therefore during the install grub2 will be installed as well.
3. since the disk will be reformatted everything will be destroyed on it.
4. if you want to install debian from windows you need to download the windows installer, you will not be able to use that iso image (I think)
 
Old 12-27-2014, 06:16 AM   #3
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 49
The debian manual didn't mention that re-formatting will be done by the bootloader.
The manual seems to be saying that GRUB2 will read files and then offer options what to do.

The GRUB2 bootloader is made up of the following files: grub2.tar.gz.sig, grub2 tar, grub2 tar xz, grub2 tar.xz.sig.
None of these files appear to be an iso image file. The debian installation file is an iso file however.
So I'm hoping this means that GRUB2 will open as a 'program' and the debian 'iso' will be used for installing the OS.

I'm not currently on windows. I only have the use of debian live USB at the moment.
 
Old 12-27-2014, 06:26 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,431

Rep: Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768
you mixed a few things. The iso file is a single file, but it contains a lot of packages. For example the install procedure itself, some packages to install and a bootloader.
The bootloader will not format anything, that is the installer. What kind of os is now running on your box? The debian live USB will/may install debian onto your hard drive (of course it will format it first), and can install the bootloader too.
 
Old 12-27-2014, 06:55 AM   #5
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by pan64 View Post
What kind of os is now running on your box? The debian live USB will/may install debian onto your hard drive (of course it will format it first), and can install the bootloader too.
I have a pc with 2 hard disks. One hard disk has Win 7 on it, but I cannot use it as it has a virus.
The other hard disk is empty except for a debian iso file, grub2 files, and some other files.

From reading the debian manual, I'm hoping to get BIOS to boot the hard disk with GRUB2 on it (not the one with windows). Once it does that, I'm hoping GRUB2 will open up and install debian from the iso file on the hard disk.
As you know, this is a different method from installing an OS from a CD or flash drive.

I am currently accessing the net with debian live which is on a USB connected to a USB port on my pc.
Can I use my debian live USB to actually install GRUB2 and debian onto my hard disk?
Have I understood you correctly?
 
Old 12-27-2014, 07:07 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,431

Rep: Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768Reputation: 2768
I do not know what was copied onto your usb, but probably yes, you can install debian using that usb drive. I do not think grub itself can install debian for you, so you need to install both (debian and grub) using your usb.
 
Old 12-27-2014, 07:32 AM   #7
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Please see this debian.org page for help. https://www.debian.org/releases/stable/amd64/
 
Old 12-27-2014, 09:05 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,277

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
If you have a Debian Live CD on the usb/flash drive, you should see a 'Debian Installer' icon on the Desktop or in the menu. Debian has a number of different methods so I'm not sure what you have.

You could create a partition with a /boot/grub directory and install Grub to it and then boot Debian but this would require manually creating the grub.cfg menu file and is much more complicated than using the normal installer.
 
1 members found this post helpful.
Old 12-27-2014, 01:10 PM   #9
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,862

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
You are confused about the functions performed by GRUB2. Every function that you ascribe to GRUB2 is actually performed by the Debian installer. GRUB2 is one of many software packages that the Debian installer will install on your hard drive.

To install Debian you need to create a Debian netinstall CD or DVD and boot that CD or DVD. Debian will format the partition that you want to install Debian to, install many software packages from the Debian repository, and install GRUB on your Debian partition and master boot record. GRUB will allow you to selectively boot any of your installed operating systems.

-----------------------
Steve Stites
 
Old 12-28-2014, 01:21 AM   #10
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by yancek View Post
If you have a Debian Live CD on the usb/flash drive, you should see a 'Debian Installer' icon on the Desktop or in the menu. Debian has a number of different methods so I'm not sure what you have.
Wow, I didn't know about the Debian Installer!

I have gone into Applications - System Tools - Administration - and opened 'Synaptic Package Manager'.

This program seems to be able to get packages off the net rather like the 'apt-get' command.

On the search tab I input 'installer' - the debian installer package came up!
I selected 'debian-installer 7.0 netboot amd64' and it looks like the package has been downloaded and stored somewhere.

However, I don't know how to locate the debian installer package and then execute it.
Thanks for your reply.
 
Old 12-28-2014, 01:31 AM   #11
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by jailbait View Post
To install Debian you need to create a Debian netinstall CD or DVD and boot that CD or DVD. Debian will format the partition that you want to install Debian to, install many software packages from the Debian repository, and install GRUB on your Debian partition and master boot record. GRUB will allow you to selectively boot any of your installed operating systems.
I have downloaded the debian installer package but am not sure what to do now.
I want to avoid burning the debian installer onto a cd as the Brasero disc burner isn't working properly. I looked on the net and a number of people have had similar problems as me.

Is there a way of runnning the debian installer package and then instructing it to do stuff on my empty hard drive?
Thanks for your suggestion.
 
Old 12-28-2014, 01:53 AM   #12
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 49
I have just gone to the debian packages site to find out about 'debian installer' (https://packages.debian.org/sid/download-installer).
I read the following message: 'Warning: This package is intended for the use in building debian-installer images only. Do not install it on a normal Debian system'.

So this means the debian installer option is not viable for me.
This is because the installer package is an image file and needs to be burnt onto a disc.
The problem is, if I had a disc-burning facility, then I'd simply burn a debian installation disc and install debian that way. I would not need the debian installer.

What I am currently trying to do is install GRUB2 onto an empty hard disk. Then when BIOS opens up GRUB2 I should then be able to install a debian iso file.

I have used 'apt-get install grub2' on my usb live debian stick. But I then get an error message about 'mounting a disk'.
So I think I need to find out the command which will mount the correct hard disk for grub2 to be installed onto.
Does anyone know this?

Also, I don't want to mount my second hard disk which has Win 7 and all my personal files!
 
Old 12-28-2014, 03:07 AM   #13
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 569

Rep: Reputation: 133Reputation: 133
You were told ten times: Grub has nothing to do with installing Debian. Grub doesn't intended for installing Debian. Grub is just a software aimed to boot a system that already installed.
If you really want to install some Linux OS, download Linux Mint liveCD, burn it onto CD and boot into it. Once it will be booted, you can find a big bold icon named "Install Linux Mint" at the desktop. Click it and start installation process. It is pretty straightforward.
 
Old 12-28-2014, 08:38 AM   #14
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by Teufel View Post
You were told ten times: Grub has nothing to do with installing Debian. Grub doesn't intended for installing Debian.
Yes, I have looked into the GRUB2 tutorial and it appears to be still at the beta stage. It seems that the functionality of the program is achieved by adding shell scripts with specific commands onto the program.
This is not what I'm looking for.

However, I have found out about a boot installer called Netbootin. Wikipedia says:
'UNetbootin... is a cross-platform utility that can create live USB systems and can load a variety of system utilities or install various Linux distributions and other operating systems without a CD'.
This is what I'm looking for.

With so many linux distros, packages, and programs it's natural to expect installation without burning a disk or DVD.
This is already possible with the likes of Netbootin.
However, this is a different topic to this thread, so I'll start a new thread about netbootin.
Thank you everyone for your comments.
 
Old 12-28-2014, 09:03 AM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,277

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
Quote:
I want to install Debian onto this hard disk via the GRUB2 bootloader.
Grub2 won't do that. You may be able to boot the Debian iso and then start the installer. I don't know that Debian can be booted directly as an iso file but it can be if extracted and copied to a partition on the disk.

Quote:
Firstly, can someone please advise if the hard disk needs to be re-formatted (to FAT32 for example)?
Not a good idea. If it runs at all it won't run well as you need a Linux filesystem format which option is available during the install.

Quote:
I am hoping that if I use GRUB2 boot loader, then it will use the iso image to install debian onto my hard drive.
I don't use Debian but, the last time I did a test install it would not boot directly from an iso but it would boot from a Grub entry after the iso was extracted and copied to disk.

Quote:
The debian manual didn't mention that re-formatting will be done by the bootloader.
That's correct, the bootloader will not format. The bootloader will boot the medium you are using and the installer on that medium will give you the option to format.

Quote:
The manual seems to be saying that GRUB2 will read files and then offer options what to do.
Grub2 will read the menu file and find the kernel/initrd and boot the system.

Quote:
I'm not currently on windows. I only have the use of debian live USB at the moment.
Using that would be the simplest way to install. If you have the Debian Live on a flash drive, there should be a Debian Installer icon on the Desktop to use to begin the install. How did you create this? I notice in your last post that you reference Unetbootin. That is a good way to put a bootable Linux system on a flash drive but from your earlier posts, you seem to already have that??

It is possible to create a small partition on a blank disk, install Grub in a boot directory and to the master boot record of the drive and boot with it. This would require a user to manually create a grub menu file which would be considerable more difficult than using a flash drive to install.

Last edited by yancek; 12-28-2014 at 09:05 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install the GRUB boot loader on a hard disk dafinof Linux - Newbie 1 05-01-2012 06:57 PM
How to keep a tidy boot loader (GRUB2)? Seviath Linux - General 0 12-15-2011 02:52 AM
Boot Loader issue : Installed to USB Hard disk :( chittu Linux - Newbie 5 05-15-2007 09:34 AM
Boot Loader needed for Windows x64 / RHEL 4 WS/ S-ATA Hard Disk I_M_Tired_Of_XP Red Hat 5 07-19-2005 01:31 AM
Creating Boot loader disks rather then installing GRUB to hard disk?? barry237 Fedora 1 06-19-2004 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration