LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 12: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, 04: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



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

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

All times are GMT -5. The time now is 04:29 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