Post c section must haves: 6 Must-Haves for Your C-Section Recovery Kit

Posted on

8 Best Postpartum Products for Easier C-Section Birth Recovery

If you have been following me on Instagram, then you know my husband and I welcomed Twin Boys on March 23rd 2021! They were born on their father’s birthday! The twins were both head down since week 32 and I was very hopeful for a natural birth. However, due to my elevated Blood Pressure I ended up having a C-Section. I did not go into natural labor and the doctors said it was too dangerous for an induction with twins (in my case).

I have done research on postpartum must haves regardless of which way they would arrive, so I was fully prepared! C-Sections are very common with twins so I knew the chance of me having a C-Section was very high. The items I am about to share were all purchased myself and are not sponsored. I truly believe these items helped speed up my recovery and I hope they will help you as well! I was fully functional two weeks PP with little to no pain. This was my first major surgery and to my surprise my recovery was very easy and I am forever grateful for that.

So let’s get into the TOP 8 items I recommend for a faster C-Section Recovery:

One. Belly Binder

I truly believe this Belly Binder was the number one reason for my faster recovery. It helped keep everything in place without putting pressure on my incision. It also helped shrink my uterus. One day I took the belly binder off for a couple of hours during the second week PP and after a few hours I had pain. I put it back on and it was gone! I wore this belly binder 24/7 once I got home from the hospital and I still wear it. I purchased my usual size and got this extender to help me fit into it right after delivery.

Turn on your JavaScript to view content

Two. High Waisted Compression Underwear

These underwear are everything! Obviously when having a C-Section, you want to avoid underwear that fall below your belly button in order to avoid contact with the incision. These underwear are so comfortable and they offer compression which is a plus for a C-Section or Vaginal delivery! I always put my belly binder on first and then the underwear on top of the binder so it is easier to go to the bathroom without having to constantly take off the binder.

Turn on your JavaScript to view content

Three. High Waisted Compression Leggings

These leggings offer the best compression when it comes to leggings. They are high waisted and really help keep everything in. Perfect for postpartum recovery regardless of which you delivered your baby.

Turn on your JavaScript to view content

Four. Always Discreet Underwear

I lived in these for the first week after my C-Section. I found them a lot more comfortable then the mesh underwear offered at the hospital because the pad would constantly move. The best part is they are disposable and you don’t have to worry about pads.

Turn on your JavaScript to view content

Five. Peri Bottle

Another item I used religiously especially the first week PP. Even with a C-Section, you still bleed a lot so this was very helpful to feel ‘clean’ after going to the bathroom.

Turn on your JavaScript to view content

Six. High Waisted Sweats

After delivery, you will have to go to a Pediatrician very shortly after giving birth. We went not even a week before the twins were born. I also had appointment with my OBGYN to check on my incision and healing so in the first two weeks I wore comfortable loose high waisted sweats. I actually used my maternity sweats and leggings and they were super comfortable. These are are a few of my favorites!

Turn on your JavaScript to view content

Seven. Button Down Dress PJs

I actually packed these in my Hospital Bag and wore them in the hospital. These pajamas are super comfortable, no pressure on the incision and nursing friendly! I got a couple of these and have been basically living in them at home since getting discharged from the hospital.

Turn on your JavaScript to view content

Eight. Gas & Stool Softener Pills

C-Section is a major abdominal surgery so gas and stool softener pills will help relieve any discomfort as a result of the surgery. I was given them at the hospital and when I came home I took Gas-X and these stool softener pills the first week. Then I sort of just forgot to take them but I no longer had any pain so I didn’t see the reason to continue taking them.

My doctor also prescribed an Ibuprofen which I believe was a little stronger than your typical over the counter medication. I took that for about week post my C-Section and once I was done with the prescription I didn’t need to take any other over the counter Ibuprofen. It is however best to have them on hand in case you experience any pain but do consult with your doctor if you have any additional questions.

Turn on your JavaScript to view content

I hope you found this useful and I hope these tips help you with a faster recovery!

Posted By: The Pretty Little Home · In: Baby

The Top 10 C-Section Recovery Must-Haves

The Top 10 C-Section Recovery Must-Haves

Now accepting patients nationwide. Find care near you.

Pregnancy + Postpartum

Jun 22, 2023Dr. Ashley Rawlins, PT, DPT10 MIN

Share this article

No matter how carefully you prepare, your fourth trimester can be more challenging than you ever expected. If your birth was via a C-section, you’re expected to care for a newborn while you’re recovering from major abdominal surgery. As busy, exhausted, and physically uncomfortable as you’re likely to be, it’s critical to protect your healing incision and take the steps you need to heal and prevent complications.

A cesarean incision that doesn’t heal properly can lead to:

  • Scar tightness, itching or pain
  • Deep abdominal scar tissue and adhesions
  • Restricted movement and muscle issues
  • Abnormal scar appearance including keloid scarring, hypertrophic scarring, or even the cesarean “shelf belly” which is when flesh hangs down over a restricted scar. 

We’re here to help! With some expert-recommended tricks up your sleeve and a few recovery products on hand, you’ll be well on your way to a smooth and confident C-section recovery.

Take it from a pelvic floor physical therapist who has helped hundreds of individuals recover after a cesarean birth, these tips, products, and people can make your healing process as easy as possible.

1. A First Aid To-Do List

The post-surgical care instructions you bring home from the hospital can sometimes be vague, confusing, or incomplete. Go over them with your provider to make sure everything is clear, and ask if there’s anything else you can do to ensure that your incision heals properly.

Here are a few generally recommended to-dos:

  • Soothe pain with ice packs. Try to ice your incision for about 10 minutes, every couple of hours for the first few days. Just make sure to put a layer of clean cotton between you and your ice pack to protect your incision. Use hospital ice packs or bring your own. If you run out of ice packs at home, frozen peas work great.
  • Check your incision daily. Keep your incision clean and dry, and look for changes such as increased redness, heat, swelling, or bleeding. If you notice anything new or different, let your healthcare provider know, ASAP.
  • Start gentle movement. If your doctor says it’s safe, you can begin walking on the day of surgery. This will help boost circulation and reduce swelling. It will also get your bowels moving (more on this below). Walking around the hospital is a great way to start. Move very slowly at first while focusing on keeping your posture upright. Pick up the pace only when you feel comfortable.

2. A C-Section Recovery Kit

Frida Mom products are truly a new parents best friend, and their C-Section Recovery Kit is no exception. It comes with a lot of little things that will help you get through your first few days of recovery, including high-waisted/disposable undies, a belly band to help support your healing abdominals (more on this below), and silicone scar sheets to encourage proper incision healing. 

3. A List of Symptoms to Watch For

With all that is going on in the first weeks after having a baby, it’s easy to be neglectful of your own needs. Make sure to check in with your surgeon so that you are aware of any specific precautions that you need to take when recovering. Also, if you notice any of the following, reach out to your healthcare provider right away so that they can make sure all is going well during your recovery:

  • Fever
  • Chills
  • Leg pain
  • Draining or leakage from the incision
  • Heavy bleeding
  • Worsening pain
  • Shortness of breath

4. Expert Tips for Bowel & Bladder Care

Swelling and pain in the lower abdomen, trauma to your bowel and bladder, and changes in drinking and eating patterns or disruption of normal muscle function due to anesthesia can all make your trips to the bathroom a bit tricky after surgery. Try these tricks to reduce bloating and/or increased bladder expansion which can strain your incision and increase your discomfort.  

  • Focus on water & fiber intake. Remember to hydrate and eat plenty of fruits and vegetables.
  • Try peppermint. Try adding a few drops of peppermint to your toilet water before you pee to help you start your flow of urine.
  • Chew gum. There is some evidence that chewing gum in the early postpartum hours will speed up your ability to pass gas and have a bowel movement.
  • Prop your feet up. When on the toilet, try putting your feet up on a squatty potty, a small stool, or even a trash can turned on to its side. This will help relax the muscles that need to lengthen to release stool.
  • Push out poop effectively. Good pushing technique is important when having a bowel movement. This involves relaxing your pelvic floor muscles while gently pushing with your abdominals. Try not to hold your breath while you’re pushing, instead exhale like you are blowing out a birthday candle.
  • Hug a pillow while you poop. Apply gentle pressure to your incision when pushing to have a bowel movement. Take a small pillow into the bathroom with you, place it on your lower abdominals to cover the incision, and then gently hug the pillow while you are pushing. This may be helpful for sneezing and coughing as well.

5. A Postpartum Abdominal Binder

Postpartum abdominal binders are compressive/supportive wraps or belts that are commonly used after cesarean section to help support overly lengthened abdominal muscles and minimizes swelling, while healing in the postpartum. 

The use of abdominal binders postpartum has been shown to help to decrease patient distress after cesarean and will likely help you get up and moving after abdominal surgery faster. Binders may also help cue posture, and increase proprioceptive input for abdominal muscles. 

There are several different abdominal binders on the market — some are made of an elastic/stretchy material, and some are non-elastic. So many options are easily available with just a quick Google search, but proper fit is key so make sure you check in with your healthcare provider to make sure you are wearing it correctly.

Download our printable guide to Cesarean recovery!

It’s on the way!

Oops! Something went wrong while submitting the form.

Cesarean Recovery

6. High-Waisted Yoga Pants

Another great option to act as a proxy abdominal binder? A snug pair of high-waisted yoga pants. These can be really helpful in giving you the input you need to help support and use your abdominal muscles when you move and care for your new baby. Plus, you already likely have these on hand, so you aren’t needing to spend the extra money. 

Pressure on your scar not your thing? Compression doesn’t feel good for everyone, and may in fact feel the total opposite of helpful. Try folding your high-waisted yoga pants below your hip bones, to free up your incision instead!

Pro Tip: pack a black pair to help disguise any postpartum bleeding or urinary leakage (this can totally happen after a cesarean too).

7. Exercises for Your Abdominals & Pelvic Floor

Your abdominals and pelvic floor muscles have been through a lot recently. It can feel scary to use your muscles after a C-section, but safe, proper muscle use during body mechanics and baby/self care activities, will not only protect your healing incision, but encourage healing by reducing swelling and encouraging blood flow. 

Practice using your pelvic floor with some gentle kegels:

  • While resting in bed, practice squeezing the muscles around your vaginal and anal openings as if you are trying to hold back gas and stop the flow of urine at the same time.
  • Try contracting as you exhale and relaxing as you inhale — this can make it easier, and even get your abdominals   working.

Gently activate your abs:

  • Breathe deeply while resting in bed. As you exhale, try to tight and draw-in your stomach below your belly button, as if you were zipping up a tight pair of jeans.
  • Engaging your deep abdominals in this way is really helpful to support your posture, stabilize your back, and support your healing incision as you hold and move with your baby.

8. Scar Care Know-How

Give special attention to your c-section scar, so that you can set a foundation for healing. Some ways to give it TLC:

  • Keep it cushioned. Your incision may be very sensitive initially and even the lightest pressure from your clothes may irritate it. Cushion your incision by placing a folded washcloth between your scar and clothing to prevent rubbing, or direct bumps to the area.
  • Try a silicone scar sheet or gel. Silicone scar care products are often recommended to help with healing and the appearance of your scar. Silicone scar sheets like the ones found in the Frida Mom kit (above) are helpful, but if not used properly may actually contribute to an infection. A helpful alternative is using a silicone gel to apply to the scar. 
  • Start massaging your scar. Once your incision is fully healed, scar massage is key to preventing long term complications like pain, or the development of adhesions. There are plenty of DIY scar massage recommendations on the internet, but it’s best to see a pelvic PT who is properly trained in safe scar massage, and can help you learn to best massage techniques for you.

9. Strategies for Moving Safely

Lifting, carrying, feeding, and cleaning up after your baby can take a toll on your muscles, joints, and incision. Use the posture and movement strategies below to prevent injury, reduce fatigue, and feel better in your body.

Ease muscle tension when standing or sitting:

  • Aim to keep a small arch in your lower back and let your shoulders relax down and away from your ears.
  • Gently draw your shoulder blades back and together, toward your spine.

Get in and out of bed without straining your abdominals:

  • Start by sitting on the edge of the bed (right about at the middle), and inhale as you get ready to move.
  • Exhale and gently squeeze your abdominal and pelvic floor muscles as you lean sideways onto the elbow of the arm closest to your pillow and lower yourself down onto your side. At the same time, raise your legs onto the bed, keeping your knees slightly bent.
  • Hold your head in line with your spine and roll like a log from your side onto your back. As you roll, keep your knees together and your abdominals and pelvic floor engaged. Your hips, shoulders, and knees should move as a single unit.
  • Use this same technique in reverse when it’s time to get out of bed.

Lift baby in and out of their crib:

  • Lowering baby down: With baby held against your chest, stand as close as you can to the crib. Place a pillow between the crib and your incision. Your feet should face the crib, at least hip-width apart. Engage your abdominals and pelvic floor as you hinge forward at the hips to lower your upper body. Keep baby against your chest and your back straight for as long as possible. As you bend with your abdomen against the crib rail, use your arms to lower baby to the mattress.
  • Lifting baby out: Place your body as close as possible to where baby is laying in the crib. Engage your abdominals and hinge forward at the hips as you scoot baby toward the edge of the mattress. With your core and upper back muscles engaged to help keep your back straight, reach down and bring baby into your arms. Then use your leg muscles to lift baby up and out of the crib.

Remember to breathe as you lift! Holding your breath prevents your muscles from moving naturally and deprives them of oxygen. Inhale first, then exhale as you lift or move your baby. Bonus points if you also engage your abs and pelvic floor muscles to stabilize your back and pelvis while protecting your incision.

10. A Referral to a Pelvic Floor PT 

On average, your baby will be seen by their pediatrician 6 times, before you meet with your obstetrician to check in even once. This is unacceptable after a cesarean section. Schedule an appointment with a pelvic physical therapist in the meantime. They are highly trained in pregnancy and postpartum recovery, and have the tools you need to help you feel your best. 

It is completely safe to start seeing a pelvic floor PT as soon as you get home from the hospital, and you can even be seen virtually as you recover in bed, by one of our pelvic floor PTs as part of the comprehensive, evidence-based Fourth Trimester Care at Origin. They will provide you with expert, individualized advice to help your body recover, while guiding you gently back into movement and exercise — no guesswork required!

Dr. Ashley Rawlins, PT, DPT

Dr. Rawlins is a physical therapist at Origin who specializes in the treatment of pelvic floor muscle dysfunctions including pelvic pain, sexual dysfunction, pregnancy related pain, postpartum recovery, and bowel and bladder dysfunction. In addition to being a practicing clinician, she is a passionate educator and author.

Share this article

There’s More to Share!

Jun 27, 2023Dr. Celeste Compton, PT, DPT, WCS5 MIN

6 Causes of Painful Sex After a C-Section or Vaginal Birth

Jun 22, 2023Dr. Ashley Rawlins, PT, DPT10 MIN

10 C-Section Recovery Must-Haves

May 04, 2023Dr. Celeste Compton, PT, DPT, WCS3 MIN

Second Trimester Back Pain Explained

See All Articles

II. Requirements to be met by the dwelling \ ConsultantPlus

II. Requirements to be met by residential premises

9. Residential premises should be located mainly in houses located in a residential area in accordance with urban planning zoning, as well as within the boundaries of the territory of gardening or horticulture by citizens for their own needs.

(as amended by Decree of the Government of the Russian Federation of December 24, 2018 N 1653)

(see the text in the previous edition)

00002 ) do not lead to a violation of the operability and bearing capacity of structures, the reliability of a residential building and ensure the safe stay of citizens and the safety of engineering equipment.

The bases and load-bearing structures of a residential building, as well as the bases and load-bearing structures that are part of the common property of the owners of premises in an apartment building, must not be destroyed and damaged, leading to their deformation or cracking, reducing their load-bearing capacity and deteriorating operational properties structures or buildings in general.

11. Residential premises, as well as the common property of the owners of premises in an apartment building, must be arranged and equipped in such a way as to prevent the risk of injury to residents when moving inside and around the residential premises, when entering the residential premises and residential building and exiting of them, as well as when using engineering equipment and ensure the possibility of moving items of engineering equipment of the corresponding premises of apartments and auxiliary premises of the house, which are part of the common property of the owners of premises in an apartment building. At the same time, the slope and width of flights of stairs and ramps, the height of the steps, the width of the treads, the width of the landings, the height of the passages along the stairs, the basement, the attic, the size of the doorways should ensure the convenience and safety of movement and placement.

12. The living quarters must be provided with engineering systems (electric lighting, domestic drinking and hot water supply, sewerage, heating and ventilation, and in gasified areas also gas supply). In settlements and on the territory where citizens conduct gardening or horticulture for their own needs without centralized engineering networks in one- and two-story buildings, the absence of water supply and sewered latrines is allowed.

(as amended by Decree of the Government of the Russian Federation of December 24, 2018 N 1653)

(see the text in the previous edition)

apartment building must comply with the requirements of sanitary and epidemiological safety. The device of the ventilation system of residential premises should exclude the flow of air from one apartment to another. It is not allowed to combine the ventilation ducts of kitchens and sanitary facilities (auxiliary premises) with living rooms.

The air exchange rate in all ventilated residential premises must comply with the standards established in the current regulatory legal acts.

14. Engineering systems (ventilation, heating, water supply, drainage, elevators, etc.) located in residential premises, as well as being part of the common property of owners of premises in an apartment building, must be placed and installed in accordance with safety requirements, established in the current regulatory legal acts, and instructions of equipment manufacturers, as well as with hygienic standards, including in relation to the permissible level of noise and vibration that are created by these engineering systems.

15. External enclosing structures of residential premises, which are part of the common property of the owners of premises in an apartment building, must have thermal insulation that ensures that during the cold season the relative humidity in the inter-apartment corridor and living rooms does not exceed 60 percent, the temperature of heated premises is not less than +18 degrees Celsius, as well as insulation from the penetration of outside cold air, vapor barrier from the diffusion of water vapor from the room, ensuring the absence of moisture condensation on the internal surfaces of non-translucent enclosing structures and preventing the accumulation of excessive moisture in the structures of a residential building.

16. Residential premises, as well as premises that are part of the common property of the owners of premises in an apartment building, must be protected from the ingress of rain, melt and ground water and possible domestic water leaks from engineering systems using structural means and technical devices.

17. Access to a dwelling located in an apartment building above the fifth floor, with the exception of the attic floor, must be carried out using an elevator.

18. The permissible height of an operated residential building and the floor area within the fire compartment, which is part of the common property of the owners of premises in an apartment building, must comply with the structural fire hazard class of the building and the degree of its fire resistance established in the current regulatory legal acts, and ensure fire safety dwellings and dwellings in general.

19. In the residential area under reconstruction, when changing the location of sanitary facilities, measures must be taken to provide them with hydro, noise and vibration isolation, ventilation systems, and, if necessary, the ceilings on which the equipment of sanitary facilities is installed must be strengthened .

the possibility of placing the necessary set of furniture and functional equipment, taking into account the requirements of ergonomics.

21. In a residential area, the required insolation must be provided for one-, two- and three-room apartments — at least in one room, for four-, five- and six-room apartments — at least in 2 rooms. The duration of insolation in the autumn-winter period of the year in a residential building for the central, northern and southern zones must meet the relevant sanitary standards. The coefficient of natural light in rooms and kitchens must be at least 0.5 percent in the middle of the dwelling.

22. The height (from floor to ceiling) of rooms and the kitchen (kitchen-dining room) in climatic regions IA, IB, IG, ID and IVa must be at least 2.7 m, and in other climatic regions — at least 2, 5 m. The height of intra-apartment corridors, halls, front, mezzanines must be at least 2.1 m.

Accommodation in the basement and basement floors is not allowed.

24. Placement of a toilet, bathroom (shower) and kitchen above the rooms is not allowed. Placing a restroom, bathroom (shower) in the upper level above the kitchen is allowed in apartments located on 2 levels.

25. Rooms and kitchens in living quarters must have direct natural light.

Natural lighting may not have other auxiliary premises intended to meet citizens’ domestic and other needs, as well as premises that are part of the common property of the owners of premises in an apartment building (corridors, lobbies, halls, etc.). The ratio of the area of ​​light openings to the floor area of ​​rooms and kitchens should be taken taking into account the lighting characteristics of windows and shading by opposing buildings, but not more than 1: 5.5 and not less than 1: 8, and for upper floors with light openings in the plane of inclined enclosing structures — at least 1:10.

26. In a residential area, the permissible sound pressure levels in octave frequency bands, equivalent and maximum sound levels and penetrating noise must comply with the values ​​established in the current regulatory legal acts, and not exceed the maximum permissible sound level in rooms and apartments during the daytime 55 dB, at night — 45 dB. At the same time, the permissible levels of noise generated in residential premises by ventilation systems and other engineering and technological equipment must be 5 dBA lower than the indicated levels during the day and night.

Inter-apartment walls and partitions must have an airborne sound insulation index of at least 50 dB.

27. In a residential area, the permissible levels of vibration from internal and external sources during the daytime and at night must comply with the values ​​established in the current regulatory legal acts.

28. In a residential area, the permissible level of infrasound must comply with the values ​​established in the current regulatory legal acts.

29. In a residential area, the intensity of electromagnetic radiation in the radio frequency range from stationary transmitting radio engineering objects (30 kHz — 300 GHz) must not exceed the permissible values ​​established in the current regulatory legal acts.

30. In a residential area, the maximum permissible strength of an alternating electric field and the maximum permissible strength of an alternating magnetic field must comply with the values ​​established in accordance with the legislation in the field of ensuring the sanitary and epidemiological welfare of the population.

(clause 30 as amended by Decree of the Government of the Russian Federation of 02.08.2016 N 746)

(see the text in the previous edition)

, more than 0.3 μSv/h, and the average annual equivalent equilibrium volume activity of radon in the air of operated premises should not exceed 200 Bq/cu. m.

32. The concentration of harmful substances in the air of a dwelling should not exceed the maximum permissible concentrations for atmospheric air in populated areas, established in the current regulatory legal acts. At the same time, the assessment of the compliance of a dwelling with the requirements that it must meet is carried out according to the maximum allowable concentrations of the most hygienically significant substances polluting the indoor air, such as nitrogen oxide, ammonia, acetaldehyde, benzene, butyl acetate, dimethylamine, 1,2-dichloroethane , xylene, mercury, lead and its inorganic compounds, hydrogen sulfide, styrene, toluene, carbon monoxide, phenol, formaldehyde, dimethyl phthalate, ethyl acetate and ethylbenzene.

(as amended by Decree of the Government of the Russian Federation of November 29, 2019 N 1535)

(see the text in the previous edition)

Studying the MBR and GPT structures / Habr

so that the operating system can understand in which areas of the disk information can be written. Since hard drives are large, their space is usually divided into several parts — disk partitions. Each such partition can be assigned its own logical drive letter (for systems of the Windows family) and you can work with it as if it were an independent drive in the system.

There are currently two ways to partition disks. The first way is to use the MBR. This method has been used almost since the advent of hard drives and works with any operating system. The second way is to use the new markup system — GPT. This method is only supported by modern operating systems, since it is still relatively young.

Structure MBR

Until recently, the MBR structure was used on all personal computers in order to be able to divide one large physical hard disk (HDD) into several logical parts — disk partitions (partition). Currently, MBR is being actively superseded by a new disk partitioning structure — GPT (GUID Partition Table). However, the MBR is still widely used, so let’s see what it is.

The MBR is always located in the first sector of the hard drive. When the computer boots, the BIOS reads this sector from the disk into memory at 0000:7C00h and transfers control to it.

So, the first section of the MBR structure is the section with the executable code, which will manage the further loading. The size of this section can be a maximum of 440 bytes. Next come 4 bytes allocated for disk identification. On operating systems where authentication is not used, this space can be occupied by executable code. The same goes for the next 2 bytes.

Starting at offset 01BEh is the hard disk partition table itself. The table consists of 4 entries (one for each possible disk partition) with a size of 16 bytes.

Record structure for one section:

The first byte in this structure is the partition activity flag. This attribute determines from which partition the boot should continue. There can only be one active partition, otherwise the download will not continue.

The next three bytes are the so-called CHS coordinates of the first sector of the partition.

At offset 04h is the partition type code. It is by this type that you can determine what is in this partition, what file system is on it, etc. A list of reserved partition types can be found, for example, on Wikipedia at the link Types of partitions.

The partition type is followed by 3 bytes that define the CHS coordinates of the last sector of the partition.

CHS-coordinates of the sector are decoded as Cylinder Head Sector and respectively indicate the number of the cylinder (track), the number of the head (surface) and the sector number. Cylinders and heads are numbered from zero, the sector is numbered from one. Thus CHS=0/0/1 means the first sector on the zero cylinder on the zero head. This is where the MBR sector is located.

All disk partitions, with the exception of the first, usually begin with the zero head and the first sector of any cylinder. That is, their address will be N/0/1. The first disk partition starts at head 1, that is, at address 0/1/1. This is all due to the fact that the space on the zero head is already occupied by the MBR sector. Thus, between the MBR sector and the start of the first partition, there are always an additional 62 unused sectors. Some OS loaders use them for their needs.

The storage format of the cylinder and sector number in the partition record structure is interesting. The cylinder number and the sector number share two bytes, but not equally, but as 10:6. That is, the sector number has the low 6 bits of the low byte, which allows you to set sector numbers from 1 to 63. And the cylinder number has 10 bits — 8 bits of the high byte and the remaining 2 bits from the low byte: «CCCCCCCC CCSSSSSS», and in the low byte contains the upper bits of the cylinder number.

The problem with CHS coordinates is that a maximum of 8 GB of disk space can be addressed using such an entry. In the DOS era, this was acceptable, but pretty soon this was no longer enough. To solve this problem, the LBA (Logical Block Addressing) addressing system was developed, which used a flat 32-bit disk sector numbering. This made it possible to address disks up to 2TB in size. Later, the bit depth of LBA was increased to 48 bits, but these changes did not affect the MBR. It still has 32-bit sector addressing.

So, LBA addressing for sectors on a disk is currently widely used, and in the partition record structure, the address of its first sector is written at offset 08h, and the partition size is at offset 0Ch.

For disks up to 8 GB in size (when addressing via CHS is still possible), the structure fields with CHS coordinates and LBA addressing must match in value (correctly convert from one format to another). For disks larger than 8 GB, the values ​​of all three bytes of CHS coordinates must be equal to FFh (the value FEh is also allowed for the head).

The signature AA55h is always at the end of the MBR structure. It to some extent allows you to check that the MBR sector is not damaged and contains the necessary data.

Extended sections

Partitions marked in the table with type 05h and 0Fh are the so-called extended partitions. With their help, you can create more partitions on the disk than the MBR allows. In fact, there are several more extended sections, for example, there are sections with types C5h, 15h, 1Fh, 91h, 9Bh, 85h. Basically, all these types of partitions were used at one time by various operating systems (such as, for example, OS / 2, DR-DOS, FreeDOS) with the same goal — to increase the number of partitions on the disk. However, over time, various formats fell away and only sections with types 05h and 0Fh remained. The only exception is type 85h. It can still be used in Linux to form a second chain of logical drives hidden from other operating systems. Partitions of type 05h are used for disks smaller than 8GB (where addressing via CHS is still possible), and type 0Fh is used for disks larger than 8GB (and LBA addressing is used).

The first sector of an extended partition contains an EBR (Extended Boot Record) structure. It is similar in many ways to the MBR structure, with the following differences:

  • EBR has no executable code. Some bootloaders can write it there, but usually this place is filled with zeros
  • Disk signatures and two unused bytes must be filled with zeros
  • Only the first two entries in the partition table can be filled. The remaining two entries must be filled with zeros

At the end of the EBR structure, as well as in the MBR, there must be a «magic» value AA55h.

Unlike MBR, where you can create no more than four partitions, the EBR structure allows you to organize a list of logical partitions, limited only by the size of the container partition (the one with type 05h or 0Fh). To organize such a list, the following format of entries is used: the first entry in the EBR partition table points to the logical partition associated with this EBR, and the second entry points to the next EBR partition in the list. If this logical partition is the last one in the list, then the second entry in the EBR partition table must be filled with zeros.

The format of the partition entries in the EBR is similar to the entry format in the MBR structure, but logically slightly different.

The partition activity indicator for partitions of the EBR structure will always be 0, since loading was performed only from the main disk partitions. The CHS coordinates at which the section starts are used if LBA addressing is not enabled, just like in the MBR structure.

But the fields where the number of the initial sector and the number of partition sectors in the LBA addressing mode should be located are used somewhat differently in the EBR structure.

For the first EBR partition table entry, the partition start sector field (offset 08h) records the distance in sectors between the current EBR sector and the beginning of the logical partition referenced by the entry. In the field of the number of partition sectors (offset 0Ch), in this case, the size of this logical partition in sectors is written.

For the second EBR partition table entry, the start sector field of the partition contains the distance between the sector of the very first EBR and the sector of the next EBR in the list. In this case, the size of the disk area from the sector of this next EBR structure to the end of the logical partition related to this structure is written in the number of partition sectors field in this case.

So the first entry in the partition table describes how to find and how big the current logical partition is, and the second entry describes how to find and how big the next EBR in the list, along with its own partition.

Structure GPT

In modern computers, the BIOS has been replaced by a new UEFI specification, and with it a new hard disk partition device — GUID Partition Table (GPT). This structure took into account all the shortcomings and limitations imposed by the MBR, and it was developed with a large margin for the future.

The GPT structure now uses only LBA addressing, there are no more CHSs and no problems with their conversion either. Moreover, 64 bits are allocated for LBA addresses, which allows you to work with them without any tricks, as with 64-bit integers, and also (if it comes to this) will make it possible in the future to easily expand 48-bit LBA addressing to 64 -bit.

In addition, unlike the MBR, the GPT structure stores two copies of itself on disk, one at the beginning of the disk and one at the end. Thus, in case of damage to the main structure, it will be possible to restore it from a saved copy.

Now let’s consider the structure of the GPT structure in more detail. The whole GPT structure on a hard disk consists of 6 parts:

LBA address Size (sectors) Purpose
LBA 0 1 Protective MBR sector
LBA 1 1 Primary GPT header
LBA 2 32 Disk partition table
LBA 34 NN Contents of disk partitions
LBA-34 32 Copy of disk partition table
LBA-2 1 Copy of GPT header

Protective MBR sector

The first sector on the disk (with LBA address 0) is still the same MBR sector. It is left for compatibility with old software and is intended to protect the GPT structure from accidental damage when running programs that do not know anything about GPT. For such programs, the partition structure will look like a single partition that takes up all the space on the hard drive.

The structure of this sector is no different from a regular MBR sector. A single entry with partition type 0xEE must be created in its partition table. The partition must start at LBA address 1 and have a size of 0xFFFFFFFF. In the fields for CHS addressing, the section, respectively, must begin with the address 0/0/2 (sector 1 is occupied by the MBR itself) and have the final CHS address FF/FF/FF. The attribute of the active partition must have the value 0 (inactive).

When running a computer with UEFI, this MBR sector is simply ignored and no code is executed in it either.

Primary GPT header

This header sector contains data on all LBA addresses used to partition the disk.

GPT header structure:

Offset (bytes) Field size (bytes) Filling example Field name and description
0x00 8 bytes 45 46 49 20 50 41 52 54 Header signature. Used to identify all EFI-compliant GPT headers. Must contain the value 45 46 49 20 50 41 52 54, which stands for «EFI PART» as text.
0x08 4 bytes 00 00 01 00 Header format version (non-UEFI specification). Currently using header version 1.0
0x0C 4 bytes 5C 00 00 00 GPT header size in bytes. Has a value of 0x5C (92 bytes)
0x10 4 bytes 27 6D 9F C9 GPT header checksum (at addresses from 0x00 to 0x5C). The checksum algorithm is CRC32. When calculating the checksum, the initial value of this field is assumed to be zero.
0x14 4 bytes 00 00 00 00 Reserved. Should be 0
0x18 8 bytes 01 00 00 00 00 00 00 00 Address of the sector containing the primary GPT header. Always has LBA value 1.
0x20 8 bytes 37 C8 11 01 00 00 00 00 Sector address containing a copy of the GPT header. Always has the value of the address of the last sector on the disk.
0x28 8 bytes 22 00 00 00 00 00 00 00 Sector address from which partitions start on the disk. In other words, the address of the first disk partition is
0x30 8 bytes 17 C8 11 01 00 00 00 00 Address of the last disk sector allocated for partitions
0x38 16 bytes 00 A2 DA 98 9F 79 C0 01 A1 F4 04 62 2F D5 EC 6D Disk GUID. Contains a unique identifier given to the disk and GPT header during partitioning
0x48 8 bytes 02 00 00 00 00 00 00 00 Partition table start address
0x50 4 bytes 80 00 00 00 Maximum number of partitions a table can contain
0x54 4 bytes 80 00 00 00 Record size for section
0x58 4 bytes 27 C3 F3 85 Partition table checksum. Checksum algorithm — CRC32
0x5C 420 bytes 0 Reserved. Must be filled with zeros

The UEFI system checks the correctness of the GPT header using a checksum calculated using the CRC32 algorithm. If the primary header is corrupted, then the checksum of the header copy is checked. If the checksum of the header copy is correct, then that copy is used to reconstruct the information in the primary header. Restoration also occurs in the opposite direction — if the primary header is correct, and the copy is incorrect, then the copy is restored using the data from the primary header. If both copies of the header are damaged, then the disk becomes unusable.

The partition table additionally has its own checksum, which is written in the header at offset 0x58. When the data in the partition table changes, this sum is recalculated and updated in the primary header and in its copy, and then the checksum of the GPT headers themselves is calculated and updated.

Disk partition table

The next part of the GPT structure is the actual partition table. Currently, Windows and Linux operating systems use the same partition table format — a maximum of 128 partitions, 128 bytes are allocated for each partition entry, respectively, the entire partition table will take 128 * 128 = 16384 bytes, or 32 disk sectors.

Partition record format:

Offset (bytes) Field size (bytes) Filling example Field name and description
0x00 16 bytes 28 73 2A C1 1F F8 D2 11BA 4B 00 A0 C9 3E C9 3B Partition type GUID. The example shows the partition type «EFI System partition». A list of all types can be found here
0x10 16 bytes C0 94 77 FC 43 86 C0 01 92 E0 3C 77 2E 43 AC 40 The partition’s unique GUID. Generated when partition is created
0x20 8 bytes 3F 00 00 00 00 00 00 00 Partition start LBA address
0x28 8 bytes CC 2F 03 00 00 00 00 00 Last LBA address of partition
0x30 8 bytes 00 00 00 00 00 00 00 00 Partition attributes as bitmask
0x38 72 bytes EFI system partition Section name. Unicode string 36 characters long

Partition attributes written at offset 0x30 can have the following bit values:

bit 0 Specifies that the partition is required for the system to function.

By alexxlab

Similar Posts