LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2013, 01:44 PM   #1
amishera
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Rep: Reputation: Disabled
Changing the init script of an initrd is not seemingly working


Hi,

I have a CentOS LiveUSB and I was trying to modify the init script there. I extrated the initrd0.img file and I was able to find an init file in the syslinux directory. I added a line

shred -u -n 1 /dev/sdb

at the very first line of it. Yet when I repackage the initrd0.img and try to boot through the live usb, there is nothing changed to the disk (ie the initi script should execute the shred commmand). The disk (/dev/sdb) has two partitions and there is a RHEL OS installed. After the shred command when the system is rebooted, the RHEL OS boots without any issue. Hence the shred command is not working at all.

If I run the shred command from with the live usb, the disks are wiped as expected. Hence I think the problem might be with the init script. Now how can I find the correct init script and effectively run the shred command from live usb?

Thanks
 
Old 05-07-2013, 05:00 PM   #2
amishera
LQ Newbie
 
Registered: Dec 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Can you some one at least tell me how to locate the init script of an initrd? I find one in the syslinux directory of my USB driver but which looks different from the one in /etc/syslinux/init of the running initrd.

Thanks
 
  


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
[SOLVED] script in /etc/init.d not working Annielover Programming 12 06-13-2011 01:22 PM
init.d script not working waffe Ubuntu 1 12-03-2007 03:55 PM
Init Script for p4d not working UglyWrangler Linux - Newbie 2 01-18-2005 11:45 AM
can't get my init script working nukeu666 Linux - Newbie 4 12-16-2004 12:12 PM
custom initrd not working -- INIT errors michael_util Slackware 9 11-24-2004 12:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:24 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration