In dual-boot system (Win 10 and Kali), whenever Win 10 is updated , the Grub is replaced by window boot manager.


The Grub can be recovered with the Kali live boot USB.


After boot process with Kali live, check the linux and EFI partitions.


# fdisk -l 



In my case, 

EFI partition ==> /dev/sda1

Linux partition ==> /dev/sda7

keep that in mind,


# mount /dev/sda7 /mnt

# mount --bind /dev /mnt/dev

# mount --bind /dev/pts /mnt/dev/pts

# mount --bind /proc /mnt/proc

# mount --bind /sys /mnt/sys

# mount --bind /dev/sda1 /mnt/boot/efi

# chroot /mnt /bin/bash

# grub-install /dev/sda

# update-grub

# exit

# umount /mnt/boot/efi

# umount /mnt/sys

# umount /mnt/proc

# umount /mnt/dev/pts

# umount /mnt/dev

# umount /mnt

# shutdown -h 0 -r


After reboot, you can see the grub entry, but window partition might not be seen,

Thus, after boot up, do "update-grub" again, 


$ sudo update-grub


Then, after next boot, you can see the window boot manager in Grub entry .




WRITTEN BY
RootFriend
개인적으로... 나쁜 기억력에 도움되라고 만들게되었습니다.

,

"secure-delete" consists of four tools : srm (the secure version of rm), sdmem (wiping memory), sfill (wiping free space in HDD), sswap (wiping swap partition)


$ apt-get install secure-delete


$ srm <path to the file>

==> by default, srm overwrites the content 38 times. you can add a final iteration of zeros as before, with the -z option

==> and recursively with -r option


$ sdmem


$ cat /proc/swaps

$ swapoff </dev/XXX>

$ sswap </dev/XXX>

$ swapon </dev/XXX>





WRITTEN BY
RootFriend
개인적으로... 나쁜 기억력에 도움되라고 만들게되었습니다.

,

because I'm familiar with CentOS, i couldn't set default kernel easily in grub.cfg in kali(debian) linux


basically, there is main menu which in turns, includes submenu.


what I want to do is setting default kernel to third entry in submenu within secondary entry in main menu.


here is the example


$ vim  /etc/default/grub

and set GRUB_DEFAULT="1>2"


$ sudo update-grub 




WRITTEN BY
RootFriend
개인적으로... 나쁜 기억력에 도움되라고 만들게되었습니다.

,



...


After update "/etc/apt/sources.list"


$ apt-get update

$ apt-get dist-upgrade



WRITTEN BY
RootFriend
개인적으로... 나쁜 기억력에 도움되라고 만들게되었습니다.

,


Reference : https://superuser.com/questions/79822/how-to-swap-the-fn-use-of-function-keys-on-an-apple-keyboard-in-linux


echo X > /sys/module/hid_apple/parameters/fnmode



if X == 0 : Fn key disabled

X == 1 : Fn key pressed by default

X == 2 : Fn key released by default


From /drivers/hid/hid-apple.c



WRITTEN BY
RootFriend
개인적으로... 나쁜 기억력에 도움되라고 만들게되었습니다.

,