Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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'.
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.
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.
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.
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.
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.
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.
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?
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.
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.
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.
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.