You are not logged in.

#1 2011-09-13 19:37:18

taylorchu
Member
Registered: 2010-08-09
Posts: 405

sai - [s]imple [a]rch [i]nstaller

https://github.com/taylorchu/sai

this is a "dead simple" installer. I wrote in 200 lines of code.

images?q=tbn:ANd9GcSTYmVPcQxtKXKVaPbXg4ROx-iC9jxw_aarWBR7mvmfzMQW6GFYEw
(The sai (釵) is a traditional Okinawan[1] martial arts weapon. The basic form of the weapon is that of a pointed, dagger-shaped metal truncheon, with two curved prongs called yoku projecting from the handle. It is generally used in pairs.[2]There are many types of sai with varying prongs for trapping and blocking.)

diff to aif
1. dead simple
2. no debug information. with only 200 lines, any bug can be caught in sight!I have added some debug information to halt the script when an error occurs.
3. use syslinux. grub1 is dead, and grub2 is stumpy.
4. use vim. I think vim > nano + vi

could any arch developers beautify the default syslinux.cfg? at least make it as cool as the grub legacy one.

Last edited by taylorchu (2011-09-15 22:47:05)


"After you do enough distro research, you will choose Arch."

Offline

#2 2011-09-14 02:31:54

jeslinmx
Member
Registered: 2010-11-20
Posts: 120

Re: sai - [s]imple [a]rch [i]nstaller

Looks pretty awesome! I'll try it someday.
Are you planning to grow the code further or just leave the feature set as it is.


Lenovo Y450 + Arch x86_64 dual boot with Windows 7 + Openbox standalone + Arch default kernel + Nouveau + yours truly = A lot of *****in' in the Arch Forums.

Offline

#3 2011-09-14 19:06:08

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: sai - [s]imple [a]rch [i]nstaller

I just minimized the code even more today. smile

This installer also hides lots of details for you. you pretty much have to config after installation. (This can be improved.)
files
/sai/sai: main body for sai; procedural functions
/sai/sai_lib: function required for sai but not procedural
/sai/sai_config: this is for customization. Do everything you want after packages installed. you may even override $var and functions.
/sai/packages.list: packages you want to install

flow
sai_start: greet users
sai_prepare: partition. asks question to generate the filesystem list. use the list to format disks and generate tmp fstab. since "filesystem" is not installed, we have to leave fstab.
sai_installpkgs: use pacman to install packages
sai_config: customize! customize! customize! do everything you want after installing arch.
sai_bootloader: install bootloader
sai_end: say goodbye to users


"After you do enough distro research, you will choose Arch."

Offline

#4 2011-09-15 10:03:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: sai - [s]imple [a]rch [i]nstaller

taylorchu wrote:

diff to aif
1. dead simple
<snip>
4. use vim. I think vim > nano + vi

I think point 4 conflicts with point 1 .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2011-09-15 21:58:36

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: sai - [s]imple [a]rch [i]nstaller

why?


"After you do enough distro research, you will choose Arch."

Offline

#6 2011-09-15 22:25:54

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: sai - [s]imple [a]rch [i]nstaller

Vim is more ninja like, which clearly fits in with the Japanophile theme of the script.  Nano is like a kid jumping around wishing he was a ninja.

Last edited by the sad clown (2011-09-15 22:26:46)


I laugh, yet the joke is on me

Offline

#7 2011-09-17 22:39:28

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: sai - [s]imple [a]rch [i]nstaller

Nano operates in a similar way to the majority of text editors, Vim operates in a different way that is much harder to understand.

i have nothing against Vim ( or vi or emacs), but for a simple installer you want a simple editor imo.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2011-09-24 22:40:34

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: sai - [s]imple [a]rch [i]nstaller

recent changes:
1. smart disk size using fdisk: whether gb or mb is based on the disk size
2. stage-based install: I notice that aif often quits because pacman receives a timeout from server. so users have to restart the installation again.
in contrast, sai will save the state(prepare, install, config, bootloader) and start at the stage that you was bailed out.


"After you do enough distro research, you will choose Arch."

Offline

#9 2011-10-18 03:32:19

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: sai - [s]imple [a]rch [i]nstaller

switched to nano.
Most people I knew dont know how to use vim. you are right lone_worf.


"After you do enough distro research, you will choose Arch."

Offline

#10 2012-02-06 03:00:45

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: sai - [s]imple [a]rch [i]nstaller

release 1.0
1. allow user to choose whether to format or just mount
2. sai will clean up the systems and some checkpoints. this lets you to install as many times as you want without reboot.


"After you do enough distro research, you will choose Arch."

Offline

#11 2012-03-22 06:20:34

rz
Member
From: Jita
Registered: 2012-01-11
Posts: 17
Website

Re: sai - [s]imple [a]rch [i]nstaller

Out of curiosity why not develop a program to help make AIF install scripts?  Work /with/ the tools provided and maybe offer more flexibility.


There's 52 ways to murder anyone. One and two are the same and they both work as well.

Offline

#12 2012-03-23 02:46:20

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: sai - [s]imple [a]rch [i]nstaller

aif has some limit on how it handles install. it is either fully automatic or fully manual.
if you choose manual, it will take a lot of time for one install.
if you choose automatic, you cannot customize disk partition. disk partition should be done carefully and manually, so i think it is a bad idea not to stay on the safe side.

sai stays in between; you can customize disk partition and let install script do configuration automatically.
as a result, your installation is both fast and safe.


"After you do enough distro research, you will choose Arch."

Offline

#13 2012-07-20 10:27:22

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: sai - [s]imple [a]rch [i]nstaller

Did run into path errors but it was down to fact I had not read readme.

Am looking for sai_config at the moment

Going to test a grub2 install function, there is nothing wrong with syslinx just giving users a second option.

Last edited by Mr Green (2012-07-20 10:29:43)


Mr Green

Offline

#14 2012-07-22 19:33:13

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: sai - [s]imple [a]rch [i]nstaller

for everyone who looks a sample config file, it is here:
https://github.com/taylorchu/march/blob … sai_config

Basically it does some additional configuration after everything is ready. Now sai only optionally run this file if you provide it.


"After you do enough distro research, you will choose Arch."

Offline

#15 2012-07-24 09:09:12

gemma
Banned
Registered: 2012-07-11
Posts: 98

Re: sai - [s]imple [a]rch [i]nstaller

Bloody good !!! Pretty much exactly as i would have done it, zero complaints. If i need to re-install will use it, but grub2 for me is a must. Nothing else handles multibooting with win7/8 correctly ( the issue of some windows progs writing to the boot sector screwing grub legacy and syslinux , the grub2 team relocated their code accordingly seems no-one else bothered)

Offline

#16 2012-07-24 17:10:21

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: sai - [s]imple [a]rch [i]nstaller

It would not be to hard to create a function for grub2

chroot /mnt grub-install blah blah /dev/sdX
chroot /mnt grub-mkconfig path to boot/grub

If you load up os-prober it does help with finding other installations [if needed]

Arch wiki page for grub2 is a better guide

Last edited by Mr Green (2012-07-24 17:10:33)


Mr Green

Offline

#17 2012-07-24 17:22:38

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: sai - [s]imple [a]rch [i]nstaller

Also a couple of ways to select editor

case $1 in
nano) echo "Nano editor"
	;;
*) echo Vim Editor
	;;
esac

# if statement
# could be reduced to one line....
if [ $1 == "nano" ]; then
	echo "Editor Nano"
fi

Of course feed output to $EDIT

Last edited by Mr Green (2012-07-24 17:23:24)


Mr Green

Offline

Board footer

Powered by FluxBB