LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-06-2009, 09:15 PM   #1
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Rep: Reputation: 166Reputation: 166
install o/s by command line


in ignorance,
I have a h.drive with several linux o/s's on and have partitioned and formated another partition using fdisk how do I install another os using a cd (or other) via the command line? I know there are easier ways but is there a command line event and what is the 'code'.

Roy.
 
Old 09-06-2009, 09:18 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
If it's Linux, boot the install media and it should ask you which partition(s) to use.
 
Old 09-07-2009, 01:54 AM   #3
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Original Poster
Rep: Reputation: 166Reputation: 166
install os (linux) using cml

sorry, I have not made myself clear. It seems a disappointment after struggling with the fdisk to revert to ease of use. Is there an install command to install an os and then choose your media? Or define your media pre-insert,etc then go ahead otherwise there seems little point in the fdisk as a new 'version' exists on modern installation disks. If that is not too contradictory.

Fred.
 
Old 09-07-2009, 02:19 AM   #4
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
If your os in in form of rpm (redhat ) or in tar format there there may be way to install it, there is no need of special command This is what my logic says.

Last edited by vishesh; 09-07-2009 at 02:21 AM.
 
Old 09-07-2009, 02:38 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
If you are using RH or CentOS, then you can boot from first disk, and then use the askmethod option to choose from the method.
If you want to use text mode, you can use text option to install directly from media using text mode.
 
Old 09-07-2009, 12:00 PM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,052

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Quote:
Originally Posted by Fred Caro View Post
I have a h.drive
Did you mean "hard drive" or something that you are calling an "H drive"?
H drive is terminology used by some other OS and is not meaningful here.

Quote:
...have partitioned and formated another partition using fdisk how do I install another os using a cd (or other) via the command line?
If you plug the CD (/DVD) in and boot from that, you will run the installer for that OS. If you don't want a graphical install, you will have to use an OS version that has a non-graphical install (in some cases that is an option that you select at boot time, in other cases its a different download).

If you want to do this from a usb device, it will need to be on a computer that has 'boot from usb' as a bios option.

Quote:
...what is the 'code'.
It is what runs when you boot. Its a program, or collection of programs. It runs.

Quote:
sorry, I have not made myself clear. It seems a disappointment after struggling with the fdisk to revert to ease of use.
Well the initial question was somewhat unclear, but i can't imagine a question that would be made appreciably clearer by that. What do you mean by "to revert to ease of use"?

AFAICT this seems irrelevant to the question, but my misunderstanding may just have greater depth than I thought.

Quote:
Or define your media pre-insert,etc
Do you mean the partitioning that you have done? Defining the boot source (bios)?

I think you may be asking something very, very easy. Here are the instructions:

Boot the install media. Use the install program. Use its partitioning/formatting options. Let the install proceed.

Now, what else were you asking?
 
Old 09-07-2009, 12:33 PM   #7
New2Linux2
Member
 
Registered: Jan 2004
Location: Arizona
Distribution: Debian
Posts: 153

Rep: Reputation: 43
It would seem that the OP's original question is "Can I install a new OS from the command line of an existing OS without having to boot to the install media?" (If I'm wrong, please disregard this post.)

To my knowledge, the new OS installer works when you boot from the install media (in this case, the CD.) However, if you use a virtual machine (VMWare and the like) you can install an image of the new OS to use in a virtual environment without having to boot to the install the media. Other than that, I think you need to install the OS by restarting the computer with the CD in the drive and boot from it instead of the OS that is currently installed on your hard drive.
 
Old 09-07-2009, 02:25 PM   #8
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
If the OP wants to install a new OS from scratch from inside an existing OS, using the command line, then he might want to take a look at Linux From Scratch. It goes through how to do exactly that. In principle, any Linux distro can be installed "from scratch" inside another, just by performing the same commands that the install routine would perform.
 
Old 09-08-2009, 05:20 PM   #9
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Original Poster
Rep: Reputation: 166Reputation: 166
chiatanya

No I'm not on Red Hat, or even Fedora, but I get your drift. What is the text, writing, to start and install an o/s on a pre-prepared disk (unmounted),eg, sda or hda 5 on any bash line be it Debian or R/H?

Fred.
p.s.
Please excuse my ignorance.
 
Old 09-08-2009, 06:43 PM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,
Quote:
Originally Posted by Fred Caro View Post
No I'm not on Red Hat, or even Fedora, but I get your drift. What is the text, writing, to start and install an o/s on a pre-prepared disk (unmounted),eg, sda or hda 5 on any bash line be it Debian or R/H?

Fred.
p.s.
Please excuse my ignorance.
What operating system are you using now?

As for the prepared partition you can use that as your install partition when you boot an installer for the GNU/Linux Distribution of choice as long as there is enough space for the filesystem. Once booted you would direct the installer to that partition. Each Distribution handles the install differently but generally you will need to use the installer for the distribution you choose.

As an example with Slackware you can use the 'USB & PXE' install method other than the cd/dvd but you still need to prepare the USB for the installer then you redirect after the boot of the USB either to boot PXE or USB install. Generalized explanation but most installers must take control of your install machine to continue with any install.

Now if your speaking of upgrading or package installs then that another method entirely for most distributions.
 
Old 09-09-2009, 04:10 AM   #11
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Original Poster
Rep: Reputation: 166Reputation: 166
install

Dear Onebuck,
what you say makes sense,especially, about the 'installation' taking control of the system but I take it you cannot issue a string of 'commands' to set up the install of an o/s.

Fred.
 
Old 09-09-2009, 09:39 AM   #12
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,
Quote:
Originally Posted by Fred Caro View Post
Dear Onebuck,
what you say makes sense,especially, about the 'installation' taking control of the system but I take it you cannot issue a string of 'commands' to set up the install of an o/s.

Fred.
Yes, you can enter a string on the command line. First, place the boot media of choice in the device of choice. Then from the command line 'shutdown -r now' will boot the device that is designated after the shutdown of the system and then rebooting.
 
Old 09-09-2009, 10:51 AM   #13
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Each Linux distro has a different installation method, some of then can be invoked or faked easily from an already installed system, however you will always need some understanding about how partitioning works, about how the bootloaders can be configured, and about some other things.

Gentoo or LFS are typical examples of Linuxes that can be installed from the commands line of an already working Linux that you have installed. In fact you could be installing Gentoo using an xterm in your Fedora desktop while surfing the net or killing some aliens. But they are not the only ones, for example, the process is well documented for Debian:

http://www.debian.org/releases/stabl...apds03.html.en

Knoppix has an installer that can also be launched from the command line, so I guess that you should be able to mount the knoppix cd or squashfs image and then just launch it. I am sure that you could find instructions for some other Linuxes as well.

There's no standard way to just put any arbitrary Linux cd on the tray and just launch a single command to install it, since the process and the very format of the disk can vary from distro to distro. That's why most people just reboot into a livecd or an usb image and use that.
 
  


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
How to install driver through command line? ahill713 Linux - Newbie 7 01-10-2008 12:31 PM
Serer install - cant see command line MisterGoof Ubuntu 1 08-24-2006 08:42 PM
DL and install X from command line NeoCzar Linux - Newbie 1 07-20-2005 11:12 PM
after install of 10.1 only have command line? robbymcw Mandriva 1 02-04-2005 10:08 AM
After Install No GUI just Command Line myristate Slackware 9 11-14-2004 07:18 PM


All times are GMT -5. The time now is 04:23 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