Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have got a grub that failed to detect existing win7 installation on my wife pc after i installed endea xfce on her pc (now is dual boot). Hence when she need win7, i temporary gave her this supergrub2 boot usb to detect and go into win7 partition. **no mood to learn to go into grub to modify it**
On 1st of April, this april fool joke keep popping up and wasting her time. Initially she was scared to death.. later on we saw it was just an april joke.
But each time she use the supergrub2 usb stick to start up pc, it display the same april fool joke. (i was expecting it to be only ONE TIME JOKE, but it kepts doing that for the whole day).
My wife shut down pc for 4 times that days.. hence she have to wait for the april fool joke to end before she can start her windowos partition, what a waste of time...
This made me thinking, we are lucky , this programmer means no harm.. but who know one day we might used a open source software that has embeded trojan horse that might activate in a certain future, just like this supergrub2.
This supergrub2 ; i have burnt it in usb disc many months before.. and it embeded joke only activated now , at april fool day.
The developer "adrian15" said, the simple code is as shown in this github. We can modify it ourselves.. https://github.com/supergrub/supergr...ub.cfg#L24-L28
I am thinking of edit the grub.cfg (where the april fool code resided) direct of the usb bootdisc.
When i plugged in the live usb, lsblk shows it /dev/sdd and /dev/sdd1
Code:
$ mkdir /mnt/supergrub2_bootdisk/
$ sudo mount /dev/sdd1 /mnt/supergrub2_bootdisk/
mount: /mnt/supergrub2_bootdisk: wrong fs type, bad option, bad superblock on /dev/sdd1, missing codepage or helper program, or other error.
That's a pretty stupid design, and completely unacceptable. I'd be searching for better solutions.
Yes, me felt the same.. but what can one expect from free software ? at least he is opened about it.. but we won't know if there is more of such or more serious code inside.
There is a saying:
**not meant to offend or be mean **
A barking dog is less dangerous as a quite dog..
At least this Adrian15 guy is opened about it.. those "open source" program that remain silence might be even more dangerous..
Yes, me felt the same.. but what can one expect from free software ? at least he is opened about it.. but we won't know if there is more of such or more serious code inside.
There is a saying:
**not meant to offend or be mean **
A barking dog is less dangerous as a quite dog..
At least this Adrian15 guy is opened about it.. those "open source" program that remain silence might be even more dangerous..
Any programmer who means no harm would never do that. To him it might seem a joke. To the user it is frightening at the very least.
I would blacklist in my mind anything that he touches and never use any of his software again, because who know when actual damage may be done.
I would immediately wipe that USB flash drive, fix the actual grub problem that prevents booting to windows, and make certain that everyone I knew or came in contact with was aware of his malicious joke method so they could also decide how they would handle it.
Finally, I would inform the management of the site where the software was downloaded of the issue. Most sites that host software do so with the intent that they not host malicious code, which that is.
This should be a lesson to you that you should only, except in special cases, download software from the repos of the distro you are using, and that living with a problem (can't boot windows on a dual boot machine) and using a work-around with software from a third party is not the way to go.
Now, back to your original question.
I think your mount command should have been
Code:
sudo umount /dev/sdd1
then
sudo mount -t vfat /dev/sdd1 /mnt/supergrub2_bootdisk/
If your system is like most it will auto-mount a usb drive that then usually must be unmounted before it can be mounted somewhere else.
set sg2d_directory="${config_directory}/sgd"
export sg2d_directory
set afd_directory="${config_directory}"
export afd_directory
if [ "$MONTH" -eq "4" -a "$DAY" -eq "1" ] ; then
configfile "${afd_directory}/afd2012.cfg"
else
configfile "${sg2d_directory}/main.cfg"
fi
/boot/grub/afd2012.cfg
Code:
insmod regexp
set stupidcounter=""
set maxstupidcounter="aaaaaaaa" # Iterate 8 times
for dev in (*); do
# $device: parenthesis removed from $dev
regexp -s device '\((.*)\)' $dev
# $fstype: filesystem type identified
probe -s fstype -f $dev
# uuid: filesystem UUID
probe -s uuid -u $dev
set root=$device
echo "Do you want to wipe $device ? (Yes/No)"
sleep 2
echo "Yes"
for file in /*; do
if test -d $file ; then
echo "Deleting $file ..."
echo "Deleting $file ......"
echo "Deleting $file ........."
echo "Deleting $file ......... Completed!"
sleep 1
set stupidcounter=a$stupidcounter
if test $stupidcounter = $maxstupidcounter ; then
set root=$saved_root
configfile "${sg2d_directory}/afdmsg.cfg"
fi
fi
done
done
set sg2d_directory="${config_directory}/sgd"
export sg2d_directory
set afd_directory="${config_directory}"
export afd_directory
if [ "$MONTH" -eq "4" -a "$DAY" -eq "1" ] ; then
configfile "${afd_directory}/afd2012.cfg"
else
configfile "${sg2d_directory}/main.cfg"
fi
/boot/grub/afd2012.cfg
Code:
insmod regexp
set stupidcounter=""
set maxstupidcounter="aaaaaaaa" # Iterate 8 times
for dev in (*); do
# $device: parenthesis removed from $dev
regexp -s device '\((.*)\)' $dev
# $fstype: filesystem type identified
probe -s fstype -f $dev
# uuid: filesystem UUID
probe -s uuid -u $dev
set root=$device
echo "Do you want to wipe $device ? (Yes/No)"
sleep 2
echo "Yes"
for file in /*; do
if test -d $file ; then
echo "Deleting $file ..."
echo "Deleting $file ......"
echo "Deleting $file ........."
echo "Deleting $file ......... Completed!"
sleep 1
set stupidcounter=a$stupidcounter
if test $stupidcounter = $maxstupidcounter ; then
set root=$saved_root
configfile "${sg2d_directory}/afdmsg.cfg"
fi
fi
done
done
Yes, that's the one. I have also looked into already, and saw exactly what you posted.
The problem is that i can't edit it.. somehow the usb stick is read only.. I was trying to delete part of the line.
I would delete these lines and keep the tool as emergency toolkit. But i won't use it as daily thing anymore. lol That joke ruin my feeling of a professionalism toward that software.
Yes, the system will auto mount the usb drive.
I see it ONLY in /dev/sdd and /dev/sdd1 (using lsblk).
I can't see it in $df and $mount
That's why i asked how to know if this usb stick is mounted or not , how to tell.
I know for sure a usb stick is mounted when i am able to access the content of the stick, or i can see it is mounted in some folder name.
But this usb stick does not have a folder locate mounted to it, however it has /dev/sdd .. is this consider mounted ? or it is call unmount ? (if it only appears to be in /dev/sdd, then, i can run fsck on it ? because fsck can't be run when it is mounted, because it will causes damage).
$df and $mount are meaningless.
Do you mean the df command and the mount command?
I did not download the iso, but I would wager that when you have your lubuntu booted then insert the usb stick it will mount.
df and mount both should give you results once it is mounted.
I guessed on the type since that is the first partition used to boot a live USB from almost any distro and I thought that was the type filesystem I see when they auto-mount, especially with uefi boot. However, upon plugging in and looking at my distro install USB I see that it is an iso9660 fs, thus substitute that where I put vfat.
The problem is that i can't edit it.. somehow the usb stick is read only.. I was trying to delete part of the line.
I believe this was explained in one of your other posts. It is because it is an iso9669 filesystem on the usb which may or may not have been FAT32, but this iso contents are and always will be read only unless and until you loop mount the iso to extract the contents, modify the contents which may require squashfs tools and then recreate the iso and copy/write it to another usb. Based on your other posts, I would suggest you leave it alone.
I've never seen anything like that and can't imagine why anyone writing a serious tool such as SuperGrubDisk would do that. From the above posts, it seems it does not actually "do" any damage although I can see how anyone using it would be upset (to say the least) upon seeing that message. Stupid 'joke'.
I believe this was explained in one of your other posts. It is because it is an iso9669 filesystem on the usb which may or may not have been FAT32, but this iso contents are and always will be read only unless and until you loop mount the iso to extract the contents, modify the contents which may require squashfs tools and then recreate the iso and copy/write it to another usb. Based on your other posts, I would suggest you leave it alone.
I've never seen anything like that and can't imagine why anyone writing a serious tool such as SuperGrubDisk would do that. From the above posts, it seems it does not actually "do" any damage although I can see how anyone using it would be upset (to say the least) upon seeing that message. Stupid 'joke'.
So, an iso9669 filesystem is read only , just like a cdrom. Good to know that. Because sometime i scare i will accidentally delete or pasted some files into usb boot stick such as (supergrub2, boot rescue, live usbs...etc) which are tools (collections).. At least i learnt something.
So, in order to remove the "joke codes" from supergrub2, i can only download a new copy of iso from internet, extract it to my folder and edit the codes.. then make it into BOOTABLE iso again (might need to learn how to do that). Not all iso are bootable.. hence have to make it into bootable iso format, then burn into the usb stick. Any idea where can i learn to do that for linux system ?
Thx
You are going to have to start reading some man pages now. All the info you need is in them. Take notes.
I have being taking notes on vim for few months already.. tons of notes.. learning curve is stiff.
No thanks to vim, some of my notes got wiped while i didn't realized.. because vim is too powerful.. but lack of warning when a large chunk of data is to be deleted.
My brain is "swelling" every since using linux.. i got no work done on linux so far.. lol.. not like what other ppl have said : "linux is just about getting work done!"..
That's a typo from my earlier post, should be iso9660.
Quote:
i can only download a new copy of iso from internet, extract it to my folder and edit the codes
There is no need to download it again and you will not be able to edit files after extracting them from the iso which is the same as loop mounting them. After extracting/loop mounting the iso, you copy the directories and files to another directory to edit them before recreating another iso. Your original iso will still exist intact.
Creating an iso on Linux is generally done with the software mkisofs, genisoimage or xorriso and you should be able to find a lot of tutorials online. If you look at post 12 in your other thread, another member has posted information on the steps necessary to do this. Seems to me it isn't worth the trouble unless you like the challenge.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.