LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-03-2021, 02:13 AM   #1
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Rep: Reputation: Disabled
April fool joke on supergrub2 usb boot disc.


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.

Click image for larger version

Name:	aE3XPcW.png
Views:	56
Size:	125.0 KB
ID:	36016
Click image for larger version

Name:	d.jpg
Views:	53
Size:	86.8 KB
ID:	36018
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.
Click image for larger version

Name:	SIDQvJs.jpg
Views:	34
Size:	106.9 KB
ID:	36017
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.
Anyway to access/ read into liveusb disk ?
 
Old 04-03-2021, 03:22 AM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,463
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
April fool joke on supergrub2 usb boot disc.

That's a pretty stupid design, and completely unacceptable. I'd be searching for better solutions.
 
1 members found this post helpful.
Old 04-03-2021, 08:16 AM   #3
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rkelsen View Post
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..
 
Old 04-03-2021, 10:02 AM   #4
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by andrewysk View Post
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.
 
Old 04-03-2021, 12:04 PM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
deleting /dev is at least shady
 
Old 04-03-2021, 02:48 PM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,145
Blog Entries: 6

Rep: Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832
Is this it?
https://www.supergrubdisk.org/catego...2-disk-stable/

I downloaded this one, 12MB.
https://sourceforge.net/projects/sup...1.iso/download

I mounted that .iso loopback, to look at it.

/boot/grub/grub.cfg
Code:
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

Last edited by teckk; 04-03-2021 at 02:51 PM.
 
Old 04-03-2021, 03:40 PM   #7
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
Is this it?
https://www.supergrubdisk.org/catego...2-disk-stable/

I downloaded this one, 12MB.
https://sourceforge.net/projects/sup...1.iso/download

I mounted that .iso loopback, to look at it.

/boot/grub/grub.cfg
Code:
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.
 
Old 04-03-2021, 04:47 PM   #8
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
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.
May i know why -t vfat ?
How do you know it is in vfat and not ext4 or other format ?
Code:
$lsblk
sdd  iso966       ISOIMAGE     2019-08-26-06-55-15-00                              
└─sdd1
From lsblk, it seems to be in cdrom format.

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).

Last edited by andrewysk; 04-03-2021 at 04:53 PM.
 
Old 04-03-2021, 07:47 PM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
$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.
 
Old 04-04-2021, 06:48 AM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,540

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
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'.
 
Old 04-04-2021, 08:02 AM   #11
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
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
 
Old 04-04-2021, 08:19 AM   #12
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,145
Blog Entries: 6

Rep: Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832
Quote:
So, in order to remove the "joke codes" from supergrub2, i can only download a new copy of iso from internet
Example, Make an .iso out of the stick.
Code:
dd if=/dev/sdd of=myfile.iso bs=1M
You are going to have to start reading some man pages now. All the info you need is in them. Take notes.
 
1 members found this post helpful.
Old 04-05-2021, 05:09 AM   #13
andrewysk
Member
 
Registered: Mar 2020
Posts: 797

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
Example, Make an .iso out of the stick.
Code:
dd if=/dev/sdd of=myfile.iso bs=1M
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!"..
 
Old 04-05-2021, 06:00 AM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,540

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Quote:
So, an iso9669 filesystem is read only
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.

Last edited by yancek; 04-05-2021 at 06:35 AM.
 
1 members found this post helpful.
  


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
supergrub2 or similar... un1x Linux - Software 2 03-13-2016 05:26 PM
LXer: Happy April Foolsâ?? Day a collection of April fool involving Linux !! LXer Syndicated Linux News 1 04-02-2012 04:57 AM
LXer: Xfce's Early April Fool's Joke LXer Syndicated Linux News 1 02-01-2012 04:00 PM
LXer: Five April Fool's Pranks for OpenOffice.org LXer Syndicated Linux News 0 03-31-2009 05:11 AM
LXer: DistroWatch Weekly: First look at Dreamlinux 3.0, April Fool's PHR prank LXer Syndicated Linux News 0 04-07-2008 06:12 AM

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

All times are GMT -5. The time now is 07:18 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
Open Source Consulting | Domain Registration