Hot answers tagged

99

Laptop batteries typically have onboard firmware to control safe charging & discharging of the battery, report battery charge level to the OS, and prevent thermal runaway, which is what will cause an Li-ion battery to explode (or more accurately, catch fire). Most modern ones also contain mechanical failsafes to prevent such fires & explosions. This ...


98

This is highly platform-dependent. Also different methods may treat edge cases differently (“fake” disks of various kinds, RAID volumes, …). On modern udev installations, there are symbolic links to storage media in subdirectories of /dev/disk, that let you look up a disk or a partition by serial number (/dev/disk/by-id/), by UUID (/dev/disk/by-uuid), by ...


58

Since you don't mention, I'm assuming this is on Linux. dmidecode -t memory dmidecode -t 16 lshw -class memory


50

How about lshw -class disk


47

lsblk will list all block devices. It lends itself well to scripting: $ lsblk -io KNAME,TYPE,SIZE,MODEL KNAME TYPE SIZE MODEL sda disk 149.1G TOSHIBA MK1637GS sda1 part 23.3G sda2 part 28G sda3 part 93.6G sda4 part 4.3G sr0 rom 1024M CD/DVDW TS-L632M lsblk is present in util-linux package and is thus far more universal than proposed ...


41

using the dmidecode | grep -A3 '^System Information' command. There you'll find all information from BIOS and hardware. These are examples on three different machines (this is an excerpt of the complete output): System Information Manufacturer: Dell Inc. Product Name: Precision M4700 System Information Manufacturer: MICRO-STAR INTERANTIONAL ...


28

While openness is certainly part of it, I think the key factor is Linus Torvald's continued insistence that all of the work, from big to small, has a place in the mainline Linux kernel, as long as it's well done. If he'd decided at some point to draw a line and say "okay, for that fancy super-computer hardware, we need a fork", then completely separate ...


26

I think all batteries can explode. The question is if Linux (an operating system using the Linux kernel) will generate more heat or not. With good use of the fan (equally good use of the fan as other operating systems might employ), the cooling should be equal or better, thus resulting in a similar (or perhaps even reduced) risk of battery explosion. There ...


24

I can address your question, having previously worked with the Linux FB. How Linux Does Its FB. First you need to have FrameBuffer support in your kernel, corresponding to your hardware. Most modern distributions have support via kernel modules. It does not matter if your distro comes preconfigured with a boot logo, I don't use one and have FB support. ...


22

In terminal type: # hdparm -I /dev/sd? | grep 'Serial\ Number' EDIT: You can also use lshw or smartctl lshw # lshw -class disk smartctl # smartctl -i /dev/sda If you are missing those tools, just install following packages # apt-get install smartmontools # apt-get install lshw


21

If your system supports a procfs, you can get much information of your running system. Its an interface to the kernels data structures, so it will also contain information about your hardware. For example to get details about the used CPU you could cat /proc/cpuinfo For more information you should see the man proc. More hardware information can be obtained ...


19

Let /dev/sda be the new drive on which to test destructive-rw and /dev/sdb the old drive where you want non-destructive-r # badblocks -wsv /dev/sda # badblocks -sv /dev/sdb -s gives the process indicator -v gives verbose output -w enables destructive read-write -n would be non-destructive read-write Read-only testing is the default and doesn't need ...


17

What you're asking for is called DMA. You need to write a driver to reserve this memory. Yes, I realize you said you didn't want the OS to intervene, and a driver becomes part of the OS, but in absence of a driver's reservation, the kernel believes all memory belongs to it. (Unless you tell the kernel to ignore the memory block, per Aaron's answer, that ...


17

You can find out a system's default page size by querying its configuration via the getconf command: $ getconf PAGE_SIZE 4096 or $ getconf PAGESIZE 4096 This is hardwired in the Linux kernel's source here: Example $ more /usr/src/kernels/3.13.9-100.fc19.x86_64/include/asm-generic/page.h ... ... /* PAGE_SHIFT determines the page size */ #define ...


16

hwinfo helps: > hwinfo --disk 21: IDE 00.0: 10600 Disk [Created at block.245] Unique ID: 3OOL.8MZXfAWnuH8 Parent ID: w7Y8.1T_0outZkp6 SysFS ID: /class/block/sda SysFS BusID: 0:0:0:0 SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0 Hardware Class: disk Model: "Hitachi HTS54322" Vendor: ...


16

There are several tools that you can use to capture specifics about your hardware. I would make use of the following set of tool to accomplish this. NOTE: I would say no, /proc/meminfo is not sufficient, unless you just want to know how much RAM your system has. System Info lshw This is a good tool for getting a general purpose list of what's currently ...


16

The short answer is no. The driver support for the same kernel version is configurable at compile time and also allows for module loading. The actual devices supported in a distro therefore depend on the included compiled in device drivers, compiled loadable modules for devices and actual installed modules. There are also devices not included in the ...


15

If you want the OS to totally ignore it, you need to make a memory hole using "memmap." See this reference. For example, if you want 512M at the 2GB barrier, you can put "memmap=512M$2G" on your kernel command line. You will need to check your dmesg to find a contiguous hole to steal so you don't stomp on any devices; that is specific to your ...


14

@Giles says this is highly platform-dependent. Here's one such example. I'm running a CentOS 5.5 system. This system has 4 disks and a 3ware RAID controller. In my case, lshw -class disk, cat /proc/scsi/scsi and parted --list shows the RAID controller (3ware 9650SE-4LP). This doesn't show the actual disks: only shows the 3ware RAID controller which ...


14

From The Linux Programming Interface, §14.1 Each device file has a major ID number and a minor ID number. The major ID identifies the general class of device, and is used by the kernel to look up the appropriate driver for this type of device. The minor ID uniquely identifies a particular device within a general class. The major and minor IDs of a ...


12

If your partition is ext2,ext3 or ext4, you can use the e2label command to set the label: e2label - Change the label on an ext2/ext3/ext4 filesystem SYNOPSIS e2label device [ new-label ] after you have set the label to, say, "data" you can add a line in /etc/fstab like this one LABEL=data /mnt/data ext4 noauto,users,rw 0 0 then you just ...


12

Check out this How do I detect the RAM memory chip specification from within a Linux machine question. This tool might help: http://www.cyberciti.biz/faq/check-ram-speed-linux/ $ sudo dmidecode --type 17 | more Sample output: # dmidecode 2.9 SMBIOS 2.4 present. Handle 0x0018, DMI type 17, 27 bytes Memory Device Array Handle: 0x0017 Error ...


12

If that's all you need, just use free: $ free -h | gawk '/Mem:/{print $2}' 7.8G free returns memory info, the -h switch tells it to print in human readable format.


12

Try sudo dmidecode -t baseboard for full information on the DMI table contents relevant to your baseboard, in a human readable form. For just the System Product, you can use either: sudo dmidecode -s system-product sudo dmidecode -s baseboard-product-name Other relevant options for motherboard info are sudo dmidecode -s system-version sudo dmidecode -s ...


12

How about these two: $ sudo dmidecode -t 4 | grep ID | sed 's/.*ID://;s/ //g' 52060201FBFBEBBF $ ifconfig | grep eth1 | awk '{print $NF}' | sed 's/://g' 0126c9da2c38 You can then combine and hash them with: $ echo $(sudo dmidecode -t 4 | grep ID | sed 's/.*ID://;s/ //g') \ $(ifconfig | grep eth1 | awk '{print $NF}' | sed 's/://g') | sha256sum ...


12

Firstly, please note that the CPUID is definitely not a commonly accessible uniquely identifying marker for any system later than an Intel Pentium III. While hashing it with MAC addresses may lead to unique markers certainly, this is due only to the unique qualities of the MACs themselves and the CPUID in that case is nothing more than circumstantial. ...


11

A pending unreadable sector is one that returned a read error and which the drive has marked for remapping at the first possible opportunity. However, it can't do the remapping until one of two things happens: The sector is reread successfully The sector is rewritten Until then, the sector remains pending. So you have two corresponding ways to deal with ...


11

From the information you've given, I surmise that: You have a black box device which you can communicate with only by plugging a USB mass storage device into it. Physically plugging and unplugging a USB drive is not acceptable, you won't have physical access after deployment. If any of these assumptions is false, you'll have an easier time. What you're ...


11

I'm running fedora 14 and lshw is not available here (at least not by default). However in my case, I used fdisk -l command (as a root user) to get the following output: Disk /dev/sda: 8589 MB, 8589934592 bytes 255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes ...


11

You can use hdparm to retrieve information about your hard drives, eg., hdparm -I /dev/sda Where I, according to the man page: -I Request identification info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older -i option. For SCSI drives, use sdparm.



Only top voted, non community-wiki answers of a minimum length are eligible