LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   install o/s by command line (https://www.linuxquestions.org/questions/linux-newbie-8/install-o-s-by-command-line-753180/)

Fred Caro 09-06-2009 08:15 PM

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.

chrism01 09-06-2009 08:18 PM

If it's Linux, boot the install media and it should ask you which partition(s) to use.

Fred Caro 09-07-2009 12:54 AM

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.

vishesh 09-07-2009 01:19 AM

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.

linuxlover.chaitanya 09-07-2009 01:38 AM

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.

salasi 09-07-2009 11:00 AM

Quote:

Originally Posted by Fred Caro (Post 3672364)
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?

New2Linux2 09-07-2009 11:33 AM

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.

btmiller 09-07-2009 01:25 PM

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.

Fred Caro 09-08-2009 04:20 PM

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.

onebuck 09-08-2009 05:43 PM

Hi,
Quote:

Originally Posted by Fred Caro (Post 3674878)
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.

Fred Caro 09-09-2009 03:10 AM

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.

onebuck 09-09-2009 08:39 AM

Hi,
Quote:

Originally Posted by Fred Caro (Post 3675493)
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. :)

i92guboj 09-09-2009 09:51 AM

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.


All times are GMT -5. The time now is 12:47 AM.