Without checking all the details for what it is doing (I would ALLWAYS check all those statements reading their man pages for what they are going to do before executing them), I found this one:
$ mkdir /home/yourname/cpio
$ mkdir /home/yourname/cpio/work
$ cd /home/yourname/cpio/work
$ cp /boot/message .
$ cpio -idv < message
$ mv message ../message-old
$ cp /home/yourname/Documents/favpic.jpg back.jpg
$ ls | cpio -ov > ../message
$ cd ..
$ su
$ cp message /boot/message
$ exit
$ rm -Rf work
It is not the <, but the > that spoils the fun (and makes the < useless).
Isn’t that a bit dangerous? There could be statements there (intentionaly or by accident/typo) that break your system. I allways take them as suggestions and then check them against man pages, etc. Also, when you do not have any knowledge about what those bash statements do (I refer to e.g. those redirects), you will not understand what the slightest typo you make will create.
Is that
cpio -idv <> ../message
realy exactly in the source you got it from (from the internet)?
And next time you want advice about something “from the internet” please state where you found it. Then people here can at least look there also and give advice based on more information then the vague “from the internet”.
My guess is that you did not backup the original file like you should have. Right? Any time you plan to make a change to an important file you should backup the original.
Re installing grub from Yast may do it at least in theory.
Unfortunately yeah. I didnot. My bad. Another point to be learned
A few days ago, I did reinstalling the grub from Yast. Twice, just to make it sure. But it didn’t change anything. So, my last hope is on re-installing it using a live-DVD.
I’ll tell you all what’s happened once I complete the step…
I still do not get a complete picture.
From the statements you gave in post #1 above, line number 5 is wrong (as I explained above). You stopped from there because you got an error (that is the cleverest thing to do: stop as soon as strange things happen and then ask). Now how can you have destroyed anything as you did not do the statements thyt followd the wrong one? In other words how, when you did not even go to the statments where you became root, could you have damaged anything in /boot?
I just have no idea too But after I got error, I got my grub has ‘strange’ behavior. It might be I run it as root when I try it, so it affected the ori file. The code I show is from the web I told before… My bad…
But the good thing is, I’ve my GRUB working as usual. The error caused by line 5th made the ori file ‘not recognized’ or by system. What I do was copy ‘message’ file from my friend’s openSuse. I just copy-paste’d it and work. But, of course, I first opened the cpio archive, just to make sure if the file has common configuration
Case Closed, btw Thank you all for time, posts and the help. I appreciate it so much.