Please help with bootable Kali

letalis
4 years ago

0

Hey, so I made a bootable USB with Kali Linux and I found a guide on how to make it persistence mode. Now I accidentally restarted my laptop, and I think that caused it not to boot up with what I saved anymore when I choose persistence mode (could even be something else totally). But when I was trying to make persistence mode again I saw I still had my /dev/sdb3/ from my last one. So I’m guessing it’s still there, but whenever I open persistence mode I just get a new default screen. Any tips on how to open the /dev/sdb3/ again?

8replies
2voices
362views
dloser
4 years ago

0

I don’t really know about this, but based on this, I don’t think much can go wrong unless you either created the partition incorrectly or changed/removed the persistence.conf file.

You can manually mount the /dev/sdb3 partition again (not /dev/sdb3/, it is not a directory), like you did to create the persistence.conf file. See if it gives any errors when you try to mount it and check if the persistence.conf file is still correct.

Have you restarted it before to test that the persistence mode worked?

letalis
4 years ago

0

No the thing is I have already made a partition, and Kali was running on persistence mode just fine. I don’t know what happened but now if i open up persistence mode it starts as the default screen as if everything was deleted, but when I tried to make a new partition I saw the /dev/sdb3 was still there so I thought maybe my stuff is still saved somewhere.

Right now it’s like everything is deleted, like if I open up persistence mode, it won’t save. When I open it up again it still starts over again. Should I just make a new partition?

How can I check if the persistence.conf file is still correct?

dloser
4 years ago

0

As I said, you can try to mount it manually like you did when you set it up.

So get root:
sudo su

Check if not already mounted:
mount
If mounted it should mention /dev/sdb3 somewhere in the output. If so, I suspect the file should be in /:
ls -al / cat /persistence.conf

If not mounted, do what you did before:
mkdir -p /mnt/my_usb mount /dev/sdb3 /mnt/my_usb
Now you can look in /mnt/my_usb to see what’s in there. It should be your files and the persistence.conf:
ls -al /mnt/my_usb cat /mnt/my_usb/persistence.conf

If persistence.conf does not exist or does not have ‘/ union’, do:
echo "/ union" > /mnt/my_usb/persistence.conf

Then umount:
umount /mnt/my_usb
And restart.

Try to understand these commands and what they are doing, so you don’t need our help as much. ;)

letalis
4 years ago

1

Hey thanks so much for your help.

So when I type mount it doesn’t mention /dev/sdb3 (only sdb1 and sdb2). So I tried this:

“If not mounted, do what you did before:

mkdir -p /mnt/my_usb
mount /dev/sdb3 /mnt/my_usb"

And it says “can’t read superblock on /dev/sdb3”.

What should I do?

dloser
4 years ago

1

Well that would explain it… Seems your partition is seriously damaged. This doesn’t seem like something that would just happen because of a sudden reboot or something. I’d say either your USB stick is failing or something has been writing where it shouldn’t.

Not sure this is the best place to get help resolving that, except perhaps if you just try to redo everything, making sure you do everything correctly (especially creating the partition so it doesn’t overlap or something).

You can try (as root) some of the following and post the results:
fdisk /dev/sda ... Command (m for help): p

d**umpe2fs /dev/sdb3

fsck -n /dev/sdb3
The -n is to make sure it doesn’t make changes yet, in case something is really wrong and you don’t want to lose data.

If the above fsck doesn’t work, but d**umpe2fs does give you information, you can use on of the mentioned “Backup superblock at ” to do:
fsck -n -b <number> /dev/sdb3

You can also do a hexd**ump to see if there is something obviously wrong:
hexd**ump -C /dev/sdb3 | less
This should normally not give anything readable, but, for example, you’d typically have all 00s up to 0x400 (a line with just * means the last line repeats a number of times) and from 0x1000 you’d see somewhat structure data (each pair of lines is very similar). If you find some obvious text or other data there, something has been writing where it shouldn’t.

If fsck works and you feel confident, you can remove the ‘-n’. But with such an error, I’d first want to know why that happened. Otherwise there is a large chance that it will happen again.

dloser
4 years ago

0

B.t.w. if you get a message “Banned words found in content”, it is probably because you have “dump” somewhere. You can circumvent this by inserting a [i][/i] somewhere in the word.

letalis
4 years ago

0

Hey I really appreciate you helping me out with this. The thing is I don’t know why, but when I boot up and I get the choices between laptop normal OS and USB Kali, if I choose Kali it just starts scanning and then it says either error or complete and laptop shuts off, and Kali doesn’t open up. What I found worked for me was that I went to Boot Setup, Reset the Setup to default, and then boot from USB, and that’s how it opened up. I have no idea why that happens. Maybe this all has something to do with it?

Anyway thanks for your help. If it really is as you say, and it is damaged or something, it’s not that big of a deal, I can just make a new one. I didn’t have any sensitive files in there. How do I go about that? Should I do something in the Kali Linux, or just format the USB and create a new one from the beginning?

dloser
4 years ago

0

Not sure about the booting, but I don’t think that should affect the partition.

If you redo it, I’d start from scratch completely; who knows what else was corrupted. As said, without know what the issue is, be prepared for it to come back to haunt you. ;) You might want to try a different drive if it fails again.

You must be logged in to reply to this discussion. Login
1 of 9

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss