LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2015, 05:03 PM   #16
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled

Quote:
Originally Posted by jpollard View Post
keyboard setup,
display setup,
disk partitioning,
identifying the target to install on (partition/lvm/mdadm + partitioning)
identifying the source to retrieve the packages from (URL/net? disk? USB? NFS?) and setup,
package selection (assuming there IS a choice).
filesystem to use (xfs,ext4,btrfs,other?)
boot configuration and initialization,
mount configuration (fstab setup mostly),
swap configuration and initialization,

Of course, if all of this is supposed to be done, then you aren't doing an installation, but something closer to just cloning a disk...

In which case all you do is install the finished clone.

Anaconda is rather complex because it is trying to do something that IS complex.
true, partitioning

unpacking includes target
source is easy, even internet ones
package selection is easy, also more of a gui thing (gui was not mentioned)
filesystem goes into partitioning
boot config is easy since you have all the data you need to do it
fstab (that includes swap) is easy when you do partitioning

i'm against using anaconda as an example as apparently it is so incredibly complex that very competent programmers can't rid it of bugs

slackwares installer is much much simpler and does it all except the partitioning part
(a gui version of it is a matter of making a gui more then anything else)
k, it doesn't do encryption and lvm
 
Old 03-02-2015, 05:29 PM   #17
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
depends on the configuration of the LVM/partitioning. Anaconda is complex, as it is trying to do the whole install/configuration/configuration tasks. It has to be complex. That is one of the nice things about Slakware - it doesn't try to do everything. But then, the person installing has to know more.

In the case of btrfs, there are storage pools to be considered which can be one or more disks/partitions.

In the case of xfs/ext4 there are optimization configurations...

As far as not using something that has already been done..
Up to you. NIH exists in lots of forms.

Boot configuration depends on what you are dealing with - BIOS/UEFI, grub/grub2/lilo/elilo... and then there are signing issues for secureboot, unless that is disabled...

Lots of variables and combinations.

Slackware is much simpler in packaging too. But it depends on what you are doing. It is considered more complex since it doesn't directly deal with dependency lists...

Last edited by jpollard; 03-02-2015 at 05:35 PM.
 
Old 03-03-2015, 03:18 AM   #18
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
When you're installing an OS, you have to be root user because you are creating partitions, file systems, etc. Or to be more precise, there's no users (other than the 'implicit root') at that time.
 
Old 03-04-2015, 03:08 AM   #19
liutabme
LQ Newbie
 
Registered: Oct 2005
Posts: 26

Rep: Reputation: 15
Just to add to what NevemTeve has written. The reason an installer requests a password is not to become root, since you already are root to do the install, but to add the password to the password file.
 
Old 03-04-2015, 09:18 AM   #20
TheHarmattan
LQ Newbie
 
Registered: Feb 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
This is turning into much larger affair
 
Old 03-05-2015, 10:54 PM   #21
allanf
Member
 
Registered: Sep 2008
Location: MN
Distribution: Gentoo, Fedora, Suse, Slackware, Debian, CentOS
Posts: 100
Blog Entries: 1

Rep: Reputation: 20
Quote:
Originally Posted by TheHarmattan View Post
I'm writing a simple installer and I'm stumped
on how to create user accounts.

How cant I create root account without first being root?


This installer is made only in C++.

Thanks for your help!
Are you making a Linux installer or an application/applet/etc installer. If it is Linux installer, the installer is running in a live environment and the root account is created on the partition the will contains the new /etc/ and as such it can be created with a password that supplied by the "installing person" via the fact that you are root in the installer or that you are a user that can do su or sudo commands.
 
Old 03-06-2015, 06:33 AM   #22
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by TheHarmattan View Post
This is turning into much larger affair
That is what happens with a system level installer. There are a LOT details to get right.

That is why people usually reuse existing installers.
 
Old 03-13-2015, 10:52 AM   #23
TheHarmattan
LQ Newbie
 
Registered: Feb 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thank you all.

I had a derp moment!

This is what I learned:

The initramfs is unpacked
and therefore in kernel space.
Which in turn gives you
"automatic admin" rights.

Last edited by TheHarmattan; 03-13-2015 at 10:53 AM.
 
Old 03-13-2015, 12:20 PM   #24
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
OS-installation is always happening in admin mode, initramfs notwithstanding (packed or otherwise).
Mind you, the installer program isn't part of the kernel.
 
Old 03-13-2015, 12:28 PM   #25
TheHarmattan
LQ Newbie
 
Registered: Feb 2015
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
OS-installation is always happening in admin mode, initramfs notwithstanding (packed or otherwise).
Mind you, the installer program isn't part of the kernel.
Right on!

Just to clarify:
The initial initramfs in the root of
the .iso will start up my installer.
I will use dracut at the end of the
install to make another initramfs on
the HD

Thaks all for your help.

Linux and the LQ forum have been
very good to me!
 
  


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
File Permissions- Once again the Permissions questions?? fusionstate Linux - Newbie 2 01-04-2014 12:47 PM
chmod: changing permissions of `/usr../bin': Read-only file File System Issue cdhar Linux - Newbie 3 12-31-2012 06:17 AM
SMB - File copy from Windows file permissions changed? tiger.woods Red Hat 1 12-04-2012 06:18 AM
File permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:15 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
Open Source Consulting | Domain Registration