Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel and initram update, some code for automation.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
olek
Apprentice
Apprentice


Joined: 22 Oct 2011
Posts: 165

PostPosted: Wed Jan 11, 2012 2:38 pm    Post subject: Kernel and initram update, some code for automation. Reply with quote

Hi! I've written a short description of steps I follow to manage kernel updates. It includes some code for automatic packing and naming of initram-images suiting names given to the kernels by doing "make install" in the kernel directory. Feedback appreciated.

http://oleeekchoff.blogspot.com/2012/01/gentoo-kernel-and-initram-fun-what-to.html
Back to top
View user's profile Send private message
FastTurtle
Guru
Guru


Joined: 03 Sep 2002
Posts: 406
Location: Shake & Bake

PostPosted: Wed Mar 21, 2012 8:12 am    Post subject: Reply with quote

how about posting a working link? or at least one that doesn't attempt to open a new tab/page with javascript as noscript indicates possible attacks.
Back to top
View user's profile Send private message
olek
Apprentice
Apprentice


Joined: 22 Oct 2011
Posts: 165

PostPosted: Wed Mar 21, 2012 9:07 pm    Post subject: Reply with quote

Hm? The link's working quite well for me?
And what's wrong with javascript?
And: blame "noscript" for indicating scripts of a standard-blogger-theme as an attack.
Back to top
View user's profile Send private message
Apheus
Apprentice
Apprentice


Joined: 12 Jul 2008
Posts: 220

PostPosted: Thu Mar 22, 2012 1:27 pm    Post subject: Reply with quote

I agree that a site which is one big javascript looks a bit awkward to me. I had to allow 3 domains to see anything at all. :roll:

And a "theme" should be a collection of colors, fonts, images and css-templates, but not a javascript program.
Back to top
View user's profile Send private message
FastTurtle
Guru
Guru


Joined: 03 Sep 2002
Posts: 406
Location: Shake & Bake

PostPosted: Thu Mar 22, 2012 4:35 pm    Post subject: Reply with quote

Olek: I don't blame Noscript for doing its job - protecting me from possible exploits - It's only one stage of my system security. The problem I have is with blogspot in general as I've encountered attack code due to some links to pages posted there. They were cleaned up by them pretty quickly but the damage was already done as far as I'm concerned. Another factor is that the site is useless to me from work because the IT dept has things locked down pretty tightly and they block blogspot for what ever reason. In other words, all I get at home is a blank page and from work I can't even access the site.

So unless you're method runs to more then a couple of hundred lines of code, there's no reason you can't post it to the forums. If an Admin says otherwise, they'll tell you and give you suggestions that don't tend to break on Linux systems that maynot have the features installed that Blogspot depends on (like the cookies blogspot wants to set just to view things. Sorry google but I don't need your features that badly.
Back to top
View user's profile Send private message
FastTurtle
Guru
Guru


Joined: 03 Sep 2002
Posts: 406
Location: Shake & Bake

PostPosted: Thu Mar 22, 2012 4:40 pm    Post subject: Reply with quote

I'm going to post what I have just stripped - nothing fancy and sure isn't a couple of hundred lines of code

Quote:
Make now your updates to your initram if you need to.
Now, the initram-image needs to be named according the new kernel.


This is some ugly, but functional code for doing that automatically.



Code:
  KERN=$(find /usr/src/ -name 'linux-*-gentoo*' -print | sort -r | grep '' -m1 | awk '{printf "initramfs%s\n",substr($1,15,255)".img"}')
    find YOURINITRAMDRECORY | cpio --quiet -o -H newc | gzip -9 > YOURKERNELDIRECTORY/$KERN && echo done


I'd say that was pretty painless and provides the code to the rest of us who dislike/can't allow/access blogspot. Now all I have to do is review how you're doing it and see if it suits my needs.

On the section about making a new kernel and updating grub, both of those are redundent to the discussion of how you've automated the creation of the initram, which is why I didn't include them. Another is I tend to use the vanilla-sources and dislike grub/grub2 preferring lilo instead - and no, I wont get into a debate as that's an entirely different topic and deserves its own thread.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum