You are not logged in.
Pages: 1
Ok.. Ive been thinking of making a bash script, something I can run after every fresh install to download all my configs/settings that I have saved and copy them into the correct location. Not only that I want it to run for example this too:
pacman -Syu
but the problem is that I have to answer "Y" to install and stuff when asked.. dont know how to implement this into my script..
The goal with this script is that after a fresh install, after running my script it shall:
* install all packages / programs that I need/want
* Configure all settings / looks that I want
* download & install & set manual kernel & apply ck-patches
After the script is run everything should be as I would like it to be..
Any help is appreciated, even links to good bash scripting sites / hints & tips / new ideas are welcome.
/Jinn
The ultimate Archlinux release name: "I am your father"
Offline
1st hint: running "yes | pacman -Syu" should cover the <I have to answer "Y" to install and stuff when asked> problem.
2nd hint: configs should probably tar-ed and bzipped and untared to destination
3rd hint: there's kernel26archck in [community] repo, containing the archck kernel (archck = ck + some other patches, something like cko) which you might find easier to set up.
:: / my web presence
Offline
but the problem is that I have to answer "Y" to install and stuff when asked.. dont know how to implement this into my script..
you can use --noconfirm to by pass the questions. You can also use yes and pipe it : yes "Y" | to whatever
Offline
Sweet.. thanx!
about the kernel26archck.. I rather feel its better building the kernel myselft, and remove all of the stuff that I dont specifically need, and therefor obtaining a minimal / optimal settings for my computer. Is it possible to do the same with an arch kernel? I mean can I just go to the kernel folder and do make menuconfig and edit &save & compile?
Cheers
Jinn
The ultimate Archlinux release name: "I am your father"
Offline
btw.. About pacman, is there a way to measure witch server works fastest for me than trying to manually download something from each server? is there a script or something to try out the connect / download speed of each server?
The ultimate Archlinux release name: "I am your father"
Offline
btw.. About pacman, is there a way to measure witch server works fastest for me than trying to manually download something from each server? is there a script or something to try out the connect / download speed of each server?
I'm not on my AL box at the moment, but isn't there an sortmirror script that somes with pacman?
Otherwise, Tor wrote a script called checkmirror in Python recently.
Offline
I was also doing some research about this:
2nd hint: configs should probably tar-ed and bzipped and untared to destination
Couldnt find anything good... any hints on where I can read this or maybe a howto?
--Edit
Reading the tar manual right now..
cheers
Jinn
The ultimate Archlinux release name: "I am your father"
Offline
1st hint: running "yes | pacman -Syu" should cover the <I have to answer "Y" to install and stuff when asked> problem.
2nd hint: configs should probably tar-ed and bzipped and untared to destination
3rd hint: there's kernel26archck in [community] repo, containing the archck kernel (archck = ck + some other patches, something like cko) which you might find easier to set up.
LOL, I love that, sounds like IceRAM already 'knows the answer' and is helping you along They're good pointers though.
I've been thinking about something like this for a while... I have a rather laboriously written bash script that I add to whenever I change a configuration file, and I've cronned it to back up all these files weekly, as well as make a list of the packages I have in a dated text file. I haven't written the script to return everything to its proper place though, so this would be good.
The main reason that I haven't done it myself is that scripts like LostFiles (see the wiki scripts section) clear out any unwanted junk from the system anyway... so I'm assuming you want this in case something goes horrifically wrong, or because you want to mirror your installation elsewhere?
Don't get me wrong, I still think it's a great idea; keep us posted.
.oO Komodo Dave Oo.
Offline
jinn wrote:but the problem is that I have to answer "Y" to install and stuff when asked.. dont know how to implement this into my script..
you can use --noconfirm to by pass the questions. You can also use yes and pipe it : yes "Y" | to whatever
..and in fact you only need yes |, correct?
.oO Komodo Dave Oo.
Offline
Penguin wrote:jinn wrote:but the problem is that I have to answer "Y" to install and stuff when asked.. dont know how to implement this into my script..
you can use --noconfirm to by pass the questions. You can also use yes and pipe it : yes "Y" | to whatever
..and in fact you only need yes |, correct?
that will output a lowercase y, but in his question he wanted an uppercase.
Offline
about the kernel26archck.. I rather feel its better building the kernel myselft, and remove all of the stuff that I dont specifically need, and therefor obtaining a minimal / optimal settings for my computer. Is it possible to do the same with an arch kernel? I mean can I just go to the kernel folder and do make menuconfig and edit &save & compile?
Pointer: "man makepkg"
ArchCK kernel info: pkg info.
Download all the files needed for the package from CVS (there's a link on the above page pointing here) and run makepkg in the folder where you saved them. A new kernel26archkernel will be built. You might want to previously customize the pkgname/pkgver/pkgrel in the PKGBUILD.
Note that the kernel will be compiled with the config from the "config" file. You can replace the config with something else (obtained by running make menuconfig or whatever) - don't forget to update the md5sums in case you replace any of the files needed by the PKGBUILD.
About packages: there was some script around here (forums) which allowed a user to make a custom ArchLinux install CD, allowing someone to put on the CD what packages they needed. You might find helpful.
Good luck.
:: / my web presence
Offline
Komodo wrote:Penguin wrote:you can use --noconfirm to by pass the questions. You can also use yes and pipe it : yes "Y" | to whatever
..and in fact you only need yes |, correct?
that will output a lowercase y, but in his question he wanted an uppercase.
Useful to know, thanks. Would that usually matter? Are most things case insensitive for such input or not?
.oO Komodo Dave Oo.
Offline
About packages: there was some script around here (forums) which allowed a user to make a custom ArchLinux install CD, allowing someone to put on the CD what packages they needed. You might find helpful.
Yes I am aware of that. Ive been studying that script a little and checking what is done. Anyway I am almost finished with my script and it doesnt contain any difficult or complex functions.. its really simple..
about why I want this script is because I do alot of reinstalls from scratch.. usually because I break the system by trying different stuff or when I feel like I have played to much with installing / configurating packages / configs and that it does not perform as good as it should..
Another reason is that I want to use this script to install on my other computers.. Ofcourse some files such as xorg.conf will have to be edited but only very small piece of it.. this will save me alot of time, not only that, all the packages that I use will be installed too.. so that I dont need to graduately install everything as I need them.. I mean packages like xpdf or java are a must among many others.. why not make save some time instead of doing pacman individually for each package.. Also I could forget the names of some certain packages..
in my case.. its a timesaver.. and fun . I am basicly new to writing scripts so this is educational for me!
another thing I want to get of my chest.. linux rulez!! so extremely much better than windoze.. I couldnt say this as honestly as I wished, if I had not come in counter with a great linux distro called arch..
The ultimate Archlinux release name: "I am your father"
Offline
yeah, linux is awesome man... once you pop, you just can't stop!
.oO Komodo Dave Oo.
Offline
Just a suggestion, but what you could do, is to create a PKGBUILD for your script, include it on a custom arch install cd and then you'll have it all without having to do anything but install :-)
Offline
@postlogic
hey.. thats a sweet idea.. thanx. I'll work on that as soon as I try out the script and check that it works as it should.
cheers mate
Jinn
The ultimate Archlinux release name: "I am your father"
Offline
Please keep us posted on this one jinn; it will be a most useful script to have.
If you run out of steam and think of calling it quits, don't! Come by here and ask more Qs in this thread, or show us what you've done so far.
Good luck
.oO Komodo Dave Oo.
Offline
Anyone knows if there's any way to modify the install script to add more files to configure during the install process? That would -definately- be nice, too.
It would solve the "issue" about you having to alter xorg.conf for your different systems too, jinn.
Offline
It would solve the "issue" about you having to alter xorg.conf for your different systems too, jinn.
A good point postlogic, although hopefully Tpowa's new simple hardware detection tool will be integrated soon, which *should* solve that problem; nonetheless, I guess it'd be handy to be able to add stuff yourself, since automated detection is never perfect
.oO Komodo Dave Oo.
Offline
getting better and better ideas from you guys, thanks!
I'll have to take a little break from arch.. I have exam soon and the last week Ive been sitting atleast 5h/day fixing my newly installed arch & trying out new stuff, working with the script.. Damn.. its really addictive.. I know that I have to make my brother hide the laptop or i wont be able to hold myself.. crap..
Anyway keep on posting sweet ideas . Ill work on the script as soon as I get some time.
Cheers mates!
Jinn
The ultimate Archlinux release name: "I am your father"
Offline
I know that I have to make my brother hide the laptop or i wont be able to hold myself..
Boy, do I know that feeling...
.oO Komodo Dave Oo.
Offline
I'm back!
My exams are over.. but new courses started, yet the exams for the new courses wont be until 8 weeks. So I will reserve the last week as always for crazy 10hours studying and use the other 7 weeks irresponsively with arch / movies / fun & lazy stuff..
Damn it feels good to be able to nerd of with archlinux again. I would easily say to stop playing with linux is harder than stop smoking..
The ultimate Archlinux release name: "I am your father"
Offline
Pages: 1