Wednesday, August 16, 2017

linux - How to create a bootable USB from one ISO file securely from the shell?

I know dd utility is often cited, but I would consider it unsafe as it could harm the system when mis-selecting a system drive.


So I'd like to create a bootable USB drive from a hybrid ISO file in one shell command-line, is there any utility to achieve that?

macos - Booting from USB via PXE

I have a computer where I am only able to network boot. I need to boot from a USB drive, is there anything I can use to network boot and then boot from USB?



Another solution would be to PXE-boot a Hackintosh installer.



Edit:

The bios is locked so I am only able to boot from the internal SSD or networkboot. Secure boot is disabled. I have already tried installing Ubuntu and KDE Neon so I know that works.

Cannot install FrontPage 2002 Server Extensions on Server 2003



I've followed this Microsoft article to install FrontPage Server Extensions 2002 on Windows Server 2003:




To install and enable FrontPage 2002 Server Extensions





  1. From the Start menu, click Control Panel.


  2. Double-click Add or Remove Programs.


  3. Click Add/Remove Windows Components.


  4. In the Windows Components Wizard, double-click Application Server, double-click Internet Information Services, and then select the
    FrontPage 2002 Server Extensions check box.


  5. Click OK twice, click Next, and then click Finish.






However on step 4, "FrontPage 2002 Server Extensions" does not show up in the list in the IIS details window. How do I get FPSE 2002 installed on my server?



From what I can understand it's supposed to be there and I just have to enable it, but that's not an option for me.


Answer



Have a look at this MS link.



ASP/FrontPage


Tuesday, August 15, 2017

linux - No space left on device, df shows 50%

I have done everything I know about, and now I'm completely lost.
I'm getting an error on my Storage partition. The drive is a ntfs, and I'm using ntfs-3g, the disk is being shared between my Windows and my Linux partitions.
But I don't think that any of that should be an issue though.



I started off with the obvious df -h




Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3 772G 434G 339G 57% /media/Storage


The partition that is of interest is /dev/sda3 -- the partition labeled Storage.
It seems I'm only using 57%.



I then booted into my Windows partition and ran a chkdsk e: /r on the drive. It did find and correct some errors. However, it didn't fix the 'no space left on disk' error.



After some googling, I notice a lot of people with the same problem found a solution that deals with inodes, so I check that df -ih




Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/sda3 340M 414K 339M 1% /media/Storage


Seems /dev/sda3 is only using 1% of inodes, and according to @grawity. NTFS won't have problems with inodes since the space is dynamically allocated.



I ran a dmesg, but there doesn't seem to be anything obviously wrong, nothing that I can tell, but I'm not very familiar with the contents.
See the dmesg output at http://pastebin.com/jtrf8NB3




I was requested to look at ntfs-3g --version since apparently there used to be a bug where it would report 'no space left on device', but that was an older version.



ntfs-3g 2012.1.15AR.1 external FUSE 28


ntfs fragmentation does not seem to be the problem as it only had a 5% fragmentation. The partition was defragmented regardless.



As requested this is the output of a mount command:





/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)

none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda2 on /media/Windows type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda3 on /media/Storage type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
/dev/sda5 on /media/Linux_partition type ext4 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/golden/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=golden)

21% memory ram usage (1,7GB) in idle Windows 10, help for optimizing

Greetings people I was wondering if you consider as normal or an excess of RAM usage by the system to be using 1.7GB of RAM in idle with 21%.


The very least I have seen is 20% but occasionally I could see a maximum of 30% which equals 2.4GB of RAM.
I'm using Win10 64bits.


I added 12 pictures in the next link so you can see either Task manager or Resource monitor, so then would appreciate a lot if there is something additional I could do for optimizing as much as humanly possible the memory RAM usage since I can imagine everything loads faster when required for working. Just being a little enthusiast. Thanks by the way for all your info.


Task manager, Resource monitor and RAMMap:


task manager


resource monitor


rammap 1


rammap 2

windows 7 - safe to delete EFI system partition (win7) on old drive after cloning?

a while back I cloned my old installation of win7 from my HDD to a new SSD using the tools provided by Samsung (if I remember correctly). I know I should have done a clean new install, but that's not the issue ;) Afterwards I changed the drive letters (which required a huge amount of research and some fiddling with the registry, but that might have been an error on my side, moving to fast), so that the SSD is my new C:\ and the HDD got to be K:\


The old drive is still in my computer, but it's no longer being used. When trying to set up a regular backup to the old HDD (which I should have done a while back, I know), windows told me the drive contained the windows recovery environment. From my understanding the Windows RE is in the EFI System Partition, right? My partition manager shows an ESP on both the SSD and the HDD, both 100 MB in size. I'm guessing it got cloned, too, but I'm not sure.


The question now is: I it safe to delete the old ESP on the HDD, or could that result in loosing the windows RE or worse?

hard drive - Raw reading USB mass storage or SCSI



Wife's USB HDD has a slight issue where a folder refuses to open (NTFS filesystem). I have been able to image the drive with Linux but for one sector (sectors are 4096 bytes). Reading that sector fails:





sudo dd if=/dev/sdb of=block skip=21647245 bs=4096 count=1
dd: error reading ‘/dev/sdb’: Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 22.9317 s, 0.0 kB/s


Replacing this sector with null bytes leads to the same symptom as in Windows, so the sector seems to be related to the problematic directory.




When accessing said sector dmesg output reads:




[20381.842495] sd 7:0:0:0: [sdb] Unhandled sense code
[20381.842506] sd 7:0:0:0: [sdb]
[20381.842510] Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[20381.842514] sd 7:0:0:0: [sdb]
[20381.842517] Sense Key : Hardware Error [current]
[20381.842531] sd 7:0:0:0: [sdb]
[20381.842535] Add. Sense: No additional sense information

[20381.842539] sd 7:0:0:0: [sdb] CDB:
[20381.842542] Read(10): 28 00 01 4a 4f 8d 00 00 01 00
[20381.842557] end_request: I/O error, dev sdb, sector 173177960
[20381.842572] Buffer I/O error on device sdb, logical block 21647245


Is there a way to read this sector, raw, without CRC checking or whatever to actually try to recover some of the corrupted data?



I opened the enclosure: the HDD is native USB, no USB to SATA conversion.




Edit:
Tried ddrescue, but has not been able to recover the bad sector either. Reading 2Gigs around the bad sector the let the heads stabilize after the seek:



sudo ddrescue -s 2Gi -o 0 -i 87593373696 /dev/sdb blkk
GNU ddrescue 1.19
Press Ctrl-C to interrupt
rescued: 2147 MB, errsize: 4096 B, current rate: 0 B/s
ipos: 88667 MB, errors: 1, average rate: 8488 kB/s
opos: 1073 MB, run time: 4.21 m, successful read: 1.06 m ago
Finished





Reading backwards (-R flag) failed too.



Edit 2: My planned second step was to use forensics to try to get the missing files. I first started looking at the MFT by hand, but this quickly gets very, very tedious. So I had the following tools on my list:




  1. the Sleuthkit

  2. ntfs-3g


  3. scalpel

  4. scrounge-ntfs



The Sleuthkit would not do anything useful, quitting very early complaining about errors in metadata structures.



With Ntfs-3g (now Tuxera) it is possible to mount the image with debug output:




sudo mount -o loop,ro,offset=258048,debug image2 ./mnt -t ntfs-3g



Trying to enter the faulty directory would trigger an error:




Index buffer (VCN 0x0) of directory inode 101874 has a size (24) differing from the directory specified size (4096).


Looking for that error in DuckduckGo lead me to the following post:
http://www.tuxera.com/forum/viewtopic.php?f=3&t=27054

It turns out that the people at Tuxera / ntfs-3g actually encourage the use of Microsoft's CHKDSK to recover NTFS errors



Running chkdsk on the disk was my third and last planned step, however it should be tried much earlier knowing that it CAN be run on a disk image, using for example OSFMount (http://www.osforensics.com/tools/mount-disk-images.html).



Most of the missing files and directories (if not all) have been recovered by chkdsk /f on the mounted disk image. More than a hundred errors (most of which being orphaned files) have been fixed.



Edit 3: I am accepting psusi's answer. Although not proved to be impossible, trying to read the bad sectors is certainly the most uncertain and difficult route for recovering data from a mildly damaged HDD.


Answer



No, it isn't possible. There is a SCSI command to do this, but you would still only be getting garbage, and it isn't supported on consumer level drives, especially not USB. Whatever was in that sector is gone.


hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...