On Friday 14 September 2001 12:57 pm, Raul Gutierrez Segales wrote:
On Thu, 13 Sep 2001, Martin Webster wrote:
First of all, excuse me for writing to your private email address, but since youthis a bit out of topic.....(anyways if you think my question is important tell me and I will forward your answer, if you choose to reply to me, to the SuSE mailing list)
6. Type: sync; sync; sync
Why sync? What is this for?
8. Remount the root filesystem (readonly this time): mount -o remount,ro /
can you just change to runlevel 6? --------> init 6
9. Finally, type: exec /sbin/init 6
Why exec? why not just init 6 here again?
sync clears the cache buffers (forcing the system to write all filesystem buffers to disk). i.e. sync the filesystems. I think it's a good idea to make the filesystem read only before changing to init 6. Checks should be done as read only. The exec command will execute a command in place of the current shell; that is, it terminates the current shell and starts a new process in its place. Thus, exec /sbin/init 6 will clean up and reboot the system. Have a look at the init scripts/init process to get a better idea of what's happening. Your question made me look at my system; LVM and ReiserFS. What else do I need to do? This is how I change root password: 1. Boot system 2. linux init=/bin/sh rw 3. #/sbin/vgchange -a y 4. #mount -t reiser /dev/system/usr /usr 5. #passwd 6. #sync; sync; sync; 7. #umount /usr 8. #mount -o remount,ro / 9. #exec /sbin/init 6 M
On Fri, Sep 14, 2001 at 08:47:33PM +0000, Martin Webster wrote:
On Friday 14 September 2001 12:57 pm, Raul Gutierrez Segales wrote:
On Thu, 13 Sep 2001, Martin Webster wrote:
First of all, excuse me for writing to your private email address, but since youthis a bit out of topic.....(anyways if you think my question is important tell me and I will forward your answer, if you choose to reply to me, to the SuSE mailing list)
6. Type: sync; sync; sync
Those were the days ! Sync will be implied by remounting the disk. The reason for 3 of them is not because you need 3 of them, one is enough. The reason was that by the time you type sync 3 times, the first sync will have flushed the write cache ... there used to be arguments about this, since the sync tells the kernel to flush the buffers, but they still may be a short time before they are physically written to the disk by the controller.
But then I remember UNIX Edition 6... -- Regards Cliff
participants (2)
-
Cliff Sarginson
-
Martin Webster