Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Linux Installation How To
Various | 17 January 2019 | Various

Posted on 01/17/2019 8:28:14 AM PST by ShadowAce

There are 4 ways of "installing" Linux:

  1. "no-install": a "Run-from-CD" LiveCD distribution. Everything runs from the CD and RAM, leaving the hard drive untouched -- completely avoiding the trickiest part of setting up Linux, "hard drive partitioning". After you take out the CD and reboot, everything is restored to the way it was before. (Many of these work just as well with USB flash drive as with CD)
  2. Linux on top of Windows: it's possible to keep windows applications running, and run Linux like any other application side-by-side with the Windows applications (this is an advantage compared to dual-booting, which shows either only Linux applications, or only Windows applications, and you have to reboot to get to the other one). andLinux, Portable Ubuntu, coLinux, Topologilinux, etc.
  3. There's a lot of information on setting up "Dual-boot" systems. This is not for beginners. (Experts generally don't do this either -- if they need 2 operating systems, they keep them on 2 physically separate hard drives, or better yet 2 physically separate computers).
  4. If you are certain there is nothing you want to keep on a computer's hard drive, you can completely erase the HD and install Linux only. This is the most fool-proof system -- Once the hard drive has been erased, the worst that can happen is erasing the hard drive again and having to start all over.
  5. This is rare now, but some distributions allow installation to any FAT32 partition even if it contains an installation of Windows. This just copies files containing the Linux and uses a Floppy or a Boot Loader to load. Wubi, etc.

Preliminary Note

You most likely do not need to do this as it is integrated into the installers

Generally installers have excellent partitioning tools so this is all part of the install. If not, or if you are not installing it is easiest to use a live CD distro that has GParted on it, such as ubuntu. GParted does not support LVM volumes used on more complicated partitioning setups, however fedoras installer for example and debians can install and partition LVM volumes.

Hard Way

You most likely do not need to do this as it is integrated into the installers

Generally installers have excellent partitioning tools so this is all part of the install. If not, or if you are not installing it is easiest to use a live CD distro that has GParted on it, such as ubuntu. GParted does not support LVM volumes used on more complicated partitioning setups, however fedoras installer for example and debians can install and partition LVM volumes.

What Size?

You would be hard-pressed to fit a normal desktop Linux system in under 2GB. It's advisable to give Linux more space than that, however, because many, many applications are available for free for Linux, and especially with a high-speed Internet connection, one is likely to install quite a lot of them.

You should plan on leaving at least 20% of each of your hard drive partitions free at all times -- modern file systems (such as NTFS, ext3 and ReiserFS) try to keep fragmentation low on their own, but they need extra space to do it with.

Manual Resizing

Easiest Way

(NOTE: Most of this only applies if there is already a version of Microsoft Windows on the computer) The volume resizing is a safe process, but afterwards the hard drive must be repartitioned. An error here can destroy the data on the hard drive, so double-check all commands. A typical session with ntfsresize ("/dev/hda1" is the most likely name for the NTFS partition. In this case, it is 10 GB in size.):

paul@faust:/$ su
Password:

You must be root to run ntfsresize. Under Knoppix {what about other live CDs? Under Gentoo's LiveCD, you are already root, so the su will not prompt for a password. Anyone know about others? I'd assume no-password or already-root would cover most of them...}, you will not be asked for a password unless you had already set one.

faust:/# umount /dev/hda1

This step is only needed if hda1 is already mounted, which is unlikely. However, if it is not needed, it will only give an error message and not do anything.

faust:/# ntfsresize -i /dev/hda1
ntfsresize v1.9.0
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 10999992832 bytes (11000 MB)
Current device size: 11013617664 bytes (11014 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 4197 MB (38.2%)
Estimating smallest shrunken size supported ...
File feature         Last used at      By inode
$MFT               :      8223 MB             0
Multi-Record       :      3160 MB         14852
You might resize at 4196970496 bytes or 4197 MB (freeing 6803 MB).
Please make a test run using both the -n and -s options before real resizing!

ntfsresize, version 1.90 and later, will automatically move files (including ones that the Windows defragmenter can't) in order to resize the partition, so defragmentation is not necessary before resizing (it might be easier to defragment while the partition is larger, though, so its a good opportunity).

The next step does a test run of the resizing process. Here, the user decided to leave Windows with about 6GB of space.

faust:/# ntfsresize -n -s 6000M /dev/hda1
ntfsresize v1.9.0
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 10999992832 bytes (11000 MB)
Current device size: 11013617664 bytes (11014 MB)
New volume size    : 5999993344 bytes (6000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 4197 MB (38.2%)
Needed relocations : 251614 (1031 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
The read-only test run ended successfully.

Now, write down the exact number of megabytes passed on the command line here (in this case, 6000). (The file system will probably not be resized to the exact size you specify, but ignore that — use what you entered.) You will need to resize the partition to the same size later.

Run ntfsresize with the same parameters, except leaving out the -n. This resizes the ntfs filesystem, but not the partition.


Splitting the partition is the only remaining task. Be sure to give it the hard drive (like "/dev/hda") as a parameter, rather than the partition ("/dev/hda1").

faust:/# cfdisk /dev/hda

If you don't have cfdisk, use fdisk instead. It has a less friendly interface, but it has exactly the same commands. Either way, no changes are made to the disk until you tell the program to (w)rite out the new partition table. If you accidentally write out the wrong partition structure, you should be able to save your data by replacing it with the correct one before doing anything to the affected partitions.


You need to

Note: If you're an advanced user and want to have few Linux systems installed side-by-side, or different file systems for experimenting, configuring Logical Volume Manager may be a good idea.

More:



TOPICS: Computers/Internet
KEYWORDS: linux
Navigation: use the links below to view more comments.
first previous 1-2021-4041-49 next last
To: Moonman62

Which one? This has a lot to do with it.


21 posted on 01/17/2019 9:47:27 AM PST by Openurmind
[ Post Reply | Private Reply | To 12 | View Replies]

To: Openurmind

What version is that? Got a link?


22 posted on 01/17/2019 9:47:36 AM PST by Blood of Tyrants (Twitter is Trump's laser pointer and the media are all cats.)
[ Post Reply | Private Reply | To 19 | View Replies]

To: Blood of Tyrants

Yep... Hold on.


23 posted on 01/17/2019 9:51:30 AM PST by Openurmind
[ Post Reply | Private Reply | To 22 | View Replies]

To: ShadowAce

Linux takes about 15 minutes to install while Windows 10 will take you the whole day and night


24 posted on 01/17/2019 9:53:47 AM PST by butlerweave
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce
I would also like to make some partition recommendatons for those who would like to fine tune their systems:

.

This is, of course, dependent on the size of your hard disk that you will be using. The above will ensure plenty of space for applications, data, and will ensure a usable system if you happen to fill up one of the /var, /opt/, or /usr filesystems.

25 posted on 01/17/2019 10:01:49 AM PST by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Blood of Tyrants

Sent you a PM with the information.


26 posted on 01/17/2019 10:09:46 AM PST by Openurmind
[ Post Reply | Private Reply | To 22 | View Replies]

To: Openurmind
That’s why I still recommend the 18.3 and am letting the dust settle on 19 and 19.1 for awhile.

I follow the same practice, I never jump right into the new distros.

27 posted on 01/17/2019 10:30:16 AM PST by SirFishalot
[ Post Reply | Private Reply | To 9 | View Replies]

To: Blood of Tyrants

I am posting this from a laptop with a bad SATA controller.

It is booted from an external USB3 drive and runs faster than when it was Windoze, so yeah. No internal HDD needed, but just a bad hard drive? So easy to swap if it is just that. Still run Linux and for when it is a Windows only program run it in a virtual machine Windows session.


28 posted on 01/17/2019 10:36:44 AM PST by LesbianThespianGymnasticMidget (TRUMP TRAIN !!! Get the hell out of the way if you are not on yet because we don't stop for idiots)
[ Post Reply | Private Reply | To 8 | View Replies]

To: SirFishalot

The 18.3 was the stable version for quite awhile and was known to work on just about everything. It was the newest release when I got mint. Just after they came out with 19. But I decided to wait and let them get the bugs out of it. Right away they put out 19.1. Yep... obviously there were some problems or they would not have come up with a newer version to replace 19 so fast. So the dust is still settling on both 19 and 19.1 for awhile.


29 posted on 01/17/2019 10:38:08 AM PST by Openurmind
[ Post Reply | Private Reply | To 27 | View Replies]

To: LesbianThespianGymnasticMidget

Right on! Thank you for sharing that very important knowledge! I was not sure if it would or not. Fantastic!


30 posted on 01/17/2019 10:49:27 AM PST by Openurmind
[ Post Reply | Private Reply | To 28 | View Replies]

To: ShadowAce

Pretty good recommendations. 80-200GB for everything but /home is plenty. I actually would recommend that folks use a second drive for /home if they can do it. Makes future upgrades very painless. It will allow you to pretty much keep all personal stuff completely separate from system files. On my current desktop, which is getting kinda old, my system drive is on a modestly sized SSD, while /home is 2 much larger drives using LVM.

31 posted on 01/17/2019 10:58:58 AM PST by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 25 | View Replies]

To: Openurmind

Thanks for your help.


32 posted on 01/17/2019 11:43:32 AM PST by Blood of Tyrants (Twitter is Trump's laser pointer and the media are all cats.)
[ Post Reply | Private Reply | To 26 | View Replies]

To: Blood of Tyrants

Absolutely my privilege, just holler anytime.


33 posted on 01/17/2019 11:50:39 AM PST by Openurmind
[ Post Reply | Private Reply | To 32 | View Replies]

To: ShadowAce

It is easier to recover from running out of disk space if everything is on fewer(one) partitions.

I suggest “new” users with modern PCs just use a single partition for everything with one common exception for a possible swap partition.

If you use RAID then a non-RAID /boot partition may also be helpful. A /boot partition ideally will be big enough to hold more than one kernel. A ‘HUGE’ monolithic kernel can be about 300MB so a .5GB /boot partition would create a limitation of one kernel only.

If you have 8G or more of RAM memory, and you run out of RAM, you will be waiting nearly forever for your computer to unfreeze while it copies up to 8G of RAM to the hard disk swap partition. Then you get to wait another almost forever for everything that is normally there to be copied back.

A computer that is actually RAM limited and forced into using slow disk based RAM(swap) will appear to be frozen.
If you are lucky the disk light will blink off occasionally to let you know it’s still ‘thinking’.

Any swap of more than 4G if it ever gets used will likely make you wish it just crashed so you could get on with life.

Same thing goes for microshaft virtual memory/paging file(disk based RAM).

If you have old hardware or RAM limited new hardware(Pi etc.) then swap not only makes sense but may be necessary to function. Adjust expectations accordingly.

YMMV
:)


34 posted on 01/17/2019 9:27:54 PM PST by Hermes37 (If you're not living on the edge, you're taking up too much space!)
[ Post Reply | Private Reply | To 25 | View Replies]

To: ShadowAce

Later.


35 posted on 01/17/2019 9:47:25 PM PST by mrsmith (Dumb sluts: Lifeblood of the Media, Backbone of the Democrat/RINO Party!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Hermes37
It is easier to recover from running out of disk space if everything is on fewer(one) partitions.

Based on my rather extensive experience, you are incorrect. If you run out of space on /, your system won't boot and you have to resort to other methods. With my partitioning scheme, running out of space on / is highly unlikely, and you can fix whichever filesystem is full.

36 posted on 01/18/2019 4:05:09 AM PST by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 34 | View Replies]

To: ShadowAce
If you are going to install Linux as i have many times, and need the patent-protected multimedia, then since in the USA and many other countries, Watching DVDs on Linux is (mostly) illegal - Neowin, then, you should not install the protected codecs , but you can purchase the Fluenda ONEPLAY Codec Pack or players. Howeve, apparently the codec pack only runs on Intel (32-bit & 64-bit).

If one want to install Linux and heed the above, then as regards dual-booting, have read from Linux sites that for any resizing of Windows partitions then one should use Windows Disk management (right click on the This PC/My Computer in explorer and choose Manage). Or use Gparted in the Linux live distro such as Mint as it is there.

Also, the easiest and safest way to dual boot if you have a desktop and a spare drive (and a 120GB SSD cost about 20.00 now), and install it (and partition if you want). Then find out which key (like F9, F11) to be tapping (not taping) just after you turn your PC on that will provide options of what source to boot from.

Then for most PCs, create a USB Linux live disk (Rufus works well), and shut down and unplug just PC and your Windows drive (do not confuse the two). Then plug in you PC, boot, tapping the F11 key or whatever you manufacturer makes it, in order to bring up a list of drives to boot from, and choose the USB drive. Then after booting the Linux live disto you can just install it using the defaults it offers.

After doing so, shut down and plug your Windows drive back in, and use the the above method to choose which drive and its system to boot from.

37 posted on 01/19/2019 6:46:01 AM PST by daniel1212 (Trust the risen Lord Jesus to save you as a damned and destitute sinner + be baptized + follow Him)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Blood of Tyrants
Question: I have a laptop with a bad HD. It’s 5 or 6 years old. Would Linux run well on it?

I just installed Linux Minti 19.1 on a HP G7 (2012) and it runs well, if no faster than W/7, and the much faster Solid State Drives are quite inexpensive. See my above post for more on this.

38 posted on 01/19/2019 6:55:00 AM PST by daniel1212 (Trust the risen Lord Jesus to save you as a damned and destitute sinner + be baptized + follow Him)
[ Post Reply | Private Reply | To 8 | View Replies]

To: daniel1212

What is the difference between the Cinnamon, MATE, and Xfce editions?


39 posted on 01/19/2019 12:14:36 PM PST by Blood of Tyrants (Twitter is Trump's laser pointer and the media are all cats.)
[ Post Reply | Private Reply | To 38 | View Replies]

To: Blood of Tyrants
What is the difference between Linux Mint MATE and Cinnamon? - Quora https://www.quora.com/What-is-the-difference-between-Linux-Mint-MATE-and-Cinna...

Cinnamon VS Mate VS KDE VS XFCE. A list of comments I found around.

40 posted on 01/19/2019 3:44:10 PM PST by daniel1212 (Trust the risen Lord Jesus to save you as a damned and destitute sinner + be baptized + follow Him)
[ Post Reply | Private Reply | To 39 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-49 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson